feat(voice): wake word enters continuous hands-free conversation - #79696
feat(voice): wake word enters continuous hands-free conversation#79696ruhipiano wants to merge 2 commits into
Conversation
When the wake word is detected, enter continuous voice mode instead of single-utterance capture. The user can keep talking after each reply (process_loop auto-restarts recording); a voice stop phrase ("stop" or config voice.stop_phrases) ends the session. The wake-word watchdog keeps the detector paused while continuous mode holds the microphone, and only re-arms once the conversation ends.
|
This was generated by AI during triage. Summary: Problems:
Solution: Checked against |
|
感谢 triage 的详细分析,问题确认属实并已修复 ✅ 问题复现确认: 修复(commit except Exception as e:
_cprint(f"{_DIM}Wake capture failed: {e}{_RST}")
# Recording never started — roll back the continuous-voice flags so
# the watchdog doesn't read busy forever...
with self._voice_lock:
self._voice_mode = False
self._voice_continuous = False
# Leave _wake_suspended set; the watchdog resumes once idle.测试:新增 |
|
Hi maintainers — quick ping on this one. The AI triage review above confirmed the reported wake-failure bug is real, and I've since fixed it in |
Summary
When the wake word is detected, the CLI now enters continuous hands-free conversation instead of single-utterance capture.
Before
Wake word → one utterance → reply → listener re-arms immediately. The user had to say the wake word again for every exchange.
After
Wake word → multi-turn conversation:
_voice_continuous = Trueis set on wake, soprocess_loopkeeps auto-restarting recording after each reply"stop"or configuredvoice.stop_phrases) or 3×silence ends the session_start_wake_watchdog) keeps the detector paused while continuous mode holds the microphone, and only re-arms once the conversation actually endsWhy the watchdog change matters
Without it, the detector could fire mid-conversation (hearing its own TTS output) and corrupt the session — a busy-check that included
_voice_continuousprevents that.Tests
tests/tools/test_wake_word.py: 27 passed (22 existing + 5 new)test_wake_enters_continuous_voice— wake sets_voice_continuous = Truetest_wake_watchdog_holds_listener_during_continuous— detector stays paused while continuoustest_wake_watchdog_resumes_listener_when_idle— re-arms after conversation endstest_voice_stop_phrase.py20 passed,test_voice_cli_integration.py28 passedruff check cli.py tests/tools/test_wake_word.py— cleanNotes
voice.stop_phrases; behavior is now consistent between push-to-talk continuous mode and wake-word continuous mode.