Rebuilding my local voice assistant pipeline blog.platypush.tech · 24 points · 2...
HN Best 200 @best
Rebuilding my local voice assistant pipeline blog.platypush.tech · 24 points · 2 comments · HN thread
TL;DR The author of Platypush rebuilt his self-hosted voice assistant pipeline, replacing the openWakeWord-based hotword plugin with a new microWakeWord plugin and reworking the shared audio preprocessing for speech end-of-speech detection using Silero VAD, hysteresis, majority-vote smoothing and an adaptive noise floor. On a synthetic benchmark, conversations now end about 1 to 1.6 seconds after the last word instead of 6 to 10 seconds.
- New assistant.microwakeword plugin built on microWakeWord via pymicro-wakeword, with the same API as assistant.openwakeword and built-in models such as alexa and okay_nabu.
- assistant.openwakeword now uses 80ms frames instead of 500ms, plus new patience_frames and detection_threshold parameters (default 0.5).
- AudioPreprocessor gained Silero VAD (via onnxruntime) with WebRTC and RMS energy fallbacks, threshold hysteresis, a 0.5s majority-vote window and an adaptive noise floor (noise_floor_factor default 2.0).
- On a synthetic benchmark with babble and burst noise, the old settings kept conversations open 6-10 seconds after speech ended; the new settings end them 1.0-1.6 seconds after the last word.
- The change is in the shared preprocessor, so assistant.vosk and other native STT plugins also benefit.
- Caveats: VAD and thresholds were tuned on synthetic audio and a few personal recordings, and the RPi microphone needs software resampling from 44.1 kHz to 16 kHz.
- On a Raspberry Pi 5, tts.piper added about 3-4 seconds of latency compared with tts.openai.
Discussion The thread is small and friendly, with two commenters sharing their own local voice assistant builds. Both report the same practical pain points: slow STT-to-LLM-to-TTS chains and the value of microWakeWord. The tone is appreciative and practical, with people trading implementation details rather than debating the author's design.
- Sequential STT, LLM and TTS is the main latency bottleneck (some): One commenter found the chained pipeline too slow even with local Whisper and Piper, since the stages do not run concurrently with the LLM call. They forked an ESP32 OpenAI realtime plugin as a workaround, accepting higher API costs for sparing use.
- microWakeWord is easy to train and worth using (some): A commenter used microWakeWord on a small screen assistant and said training a custom wake word needed only a few tens of recorded samples. They recommended it without reservation.
- Fast local commands can bypass the LLM (a few): Another commenter added a short-circuit plugin that runs regex matches right after recognition for sub-second home commands. Unmatched phrases go to the assistant, which can refine the regex over time.
Links from the comments
#voiceAssistant #microWakeWord #speechToText #raspberryPi #selfHosted #voiceActivityDetection