add voice gateway (wake word, speech-to-text, text-to-speech)

This commit is contained in:
gabby committed 2026-10-06 04:32:21 +00:00
1 parent 4496b8eceb
commit d25b3259e4
10 files changed
+1522 -24

No files matched your search

+44
View File
@@ -158,6 +158,50 @@
"home_channel": "",
"reply_prefix": "",
"text_batch_delay": 0.8
},
"voice": {
"_comment": "Voice command adapter: a local microphone front end with wake word + speech-to-text + text-to-speech. Requires the optional voice stack (requirements/voice.txt; sounddevice + openwakeword + faster-whisper + piper-tts + onnxruntime; the system needs libportaudio2). Lazy-imported; the gateway refuses to start with an install hint. Runs best in the user's audio session (foreground `gateway --platform voice`), not a headless systemd user service. Audio is 16 kHz mono int16; capture/playback run at the device's native rate and are resampled to/from 16 kHz (capture_sample_rate/output_sample_rate override it; 0 = the device default). wake.model is an openWakeWord model name or path (bootstrap downloads models into the venv, where they resolve by name; model_dir is an optional local dir for a custom model file); stt.model is a faster-whisper size/path (cached under .runtime/hf); tts.voice is a Piper voice id or path (bootstrap downloads it under .runtime/voice/tts). After each reply the next utterance is accepted without the wake word for follow_up_window_s. max_speak_chars truncates long replies before speaking. chat_id identifies the single local session; home_channel defaults to it so timers/repair offers are spoken too.",
"enabled": false,
"chat_id": "voice",
"display_name": "voice",
"home_channel": "voice",
"reply_prefix": "",
"max_speak_chars": 600,
"follow_up_window_s": 5.0,
"wake": {
"model": "hey_mycroft",
"threshold": 0.5,
"inference_framework": "onnx",
"model_dir": ""
},
"stt": {
"model": "base.en",
"device": "cpu",
"compute_type": "int8",
"language": "en"
},
"tts": {
"voice": "en_US-lessac-medium",
"voice_dir": "",
"speaker_id": 0,
"length_scale": 1.0
},
"audio": {
"input_device": "",
"output_device": "",
"sample_rate": 16000,
"frame_ms": 80,
"capture_sample_rate": 0,
"output_sample_rate": 0,
"dc_removal": true
},
"vad": {
"silence_ms": 1000,
"min_speech_ms": 120,
"max_utterance_s": 30,
"aggressiveness": 2,
"energy_threshold": 200.0
}
}
},
"dashboard": {"port": 8765, "host": "127.0.0.1"}