Wake Word¶
missy-edge uses openWakeWord with ONNX Runtime for local wake word detection. Detection runs entirely on the Pi -- no audio leaves the device until the wake word is heard.
How it works¶
- The
WakeWordDetectorprocesses 80ms audio chunks from the microphone. - Each chunk is scored by the ONNX model (< 5ms on Pi 5).
- When the score exceeds
wakeword_threshold, the wake word is triggered. - The pre-trigger buffer (default 0.3s) is prepended to the audio stream, capturing the words spoken just before the wake word.
- Audio streaming begins to the Missy server.
- Silence detection (configurable threshold + timeout) ends the utterance.
LED states during a conversation¶
| State | LED color | Meaning |
|---|---|---|
| Idle | Off | Listening for wake word |
| Listening | Green | Wake word detected, recording speech |
| Processing | Blue | Audio sent, waiting for agent response |
| Speaking | White | Playing TTS response |
| Muted | Red (solid) | Hardware mute active |
| Error | Red (flashing) | Connection or processing error |
Default wake word¶
The default wake word model detects "Hey Missy" or "Missy" depending on the model file. The default model is bundled or downloaded by setup_pi.sh to /opt/missy-edge/models/.
Configuration¶
# Wake word settings in /etc/missy-edge/config.yaml
wakeword_model: "" # Empty = use default model
wakeword_threshold: 0.7 # Detection confidence [0.0, 1.0]
pre_trigger_seconds: 0.3 # Seconds of audio buffered before detection
Tuning the threshold¶
| Threshold | Behavior |
|---|---|
| 0.5 | Very sensitive -- more detections but more false positives |
| 0.7 | Balanced (default) |
| 0.85 | Conservative -- fewer false positives but may miss quiet speech |
| 0.95 | Very conservative -- only triggers on clear, close speech |
Start with the default
Begin with 0.7 and adjust based on your environment. If the Pi triggers on TV audio or background speech, increase the threshold. If it misses your wake word, decrease it.
Custom wake word models¶
Using a pre-trained model¶
openWakeWord provides several pre-trained models. Download an .onnx file and point to it:
Training a custom model¶
To train your own wake word:
- Follow the openWakeWord training guide.
- Generate positive examples (recordings of your desired wake phrase).
- Generate negative examples (background noise, unrelated speech).
- Train and export to
.onnxformat. - Place the model file on the Pi:
- Update the config:
- Restart the service:
Pre-trigger buffer¶
The pre-trigger buffer is a ring buffer that keeps the last N seconds of audio in memory. When the wake word is detected, this buffered audio is prepended to the stream sent to the server.
This solves the problem of "clipping" the beginning of speech when a user says "Missy, what time is it" in one breath -- without the pre-trigger buffer, "what time" might be lost.
pre_trigger_seconds: 0.3 # Default: 300ms
pre_trigger_seconds: 0.5 # Increase for users who speak quickly after the wake word
Barge-in prevention¶
During TTS playback, wake word detection is suppressed to prevent the Pi from triggering on its own speaker output. Detection resumes automatically when playback ends.
Dependencies¶
Wake word detection requires the wakeword extra:
This installs:
openwakeword-- wake word detection frameworkonnxruntime-- ONNX model inference (CPU-optimized for ARM64)
tflite-runtime compatibility
Some openWakeWord features require tflite-runtime, which has specific Python version requirements. Check the openWakeWord docs for the latest compatibility matrix.
Troubleshooting¶
Wake word not triggering¶
- Check the threshold: lower
wakeword_thresholdto 0.5 and test. - Verify the microphone:
arecord -lshould show the ReSpeaker device. - Check the model path: ensure the
.onnxfile exists and is readable. - Run with verbose logging:
missy-edge -vto see detection scores.
Too many false positives¶
- Increase
wakeword_thresholdto 0.85 or higher. - Move the Pi away from TVs or speakers.
- Check ambient noise: the heartbeat reports
noise_level-- view withmissy devices status.
High CPU usage¶
- openWakeWord should use < 5% CPU on Pi 5. If higher, check that you are using the ONNX Runtime (not TensorFlow Lite fallback).
- Verify ARM64 optimizations:
uname -mshould showaarch64.