voice: wake-word barge-in (interrupt a spoken reply)
While a reply is speaking the wake word is still scored, so the user can
interrupt it. On a wake the daemon aborts the playback, mutes further
speech while the interrupt is captured/handled, and hands the following
command to the front end. A bare "stop"/"cancel" aborts the reply and
drops anything queued behind it; anything else runs as a new command.
- voice_transport: AudioIO.play(pcm, rate, stop_event); SoundDeviceAudio
streams in ~50 ms chunks and aborts the output stream on a stop.
VoiceDaemon gains barge_in.{enabled,wait_s,threshold} and the
on_barge_in(active) callback; speak() drops text while muted and plays
through the interruptible path.
- gateway/voice: tags the interrupt utterance (raw["barge_in"]),
classifies stop vs new command (_is_stop_command), drops queued replies
on stop, and unmutes once handled.
- config: gateway.voice.barge_in block; config.example.json regenerated.
- tests: wake-abort, mute release, threshold gate, stop/new-command
classification, sentinel preservation.
This commit is contained in:
1 parent
a8ca65a6e4
commit
faebe8a53a
6 files changed
+542
-57
No files matched your search
+6
-1
@@ -246,7 +246,12 @@
|
||||
"aggressiveness": 2,
|
||||
"energy_threshold": 200.0
|
||||
},
|
||||
"follow_up_window_s": 0.0
|
||||
"follow_up_window_s": 0.0,
|
||||
"barge_in": {
|
||||
"enabled": true,
|
||||
"wait_s": 2.0,
|
||||
"threshold": 0.0
|
||||
}
|
||||
}
|
||||
},
|
||||
"dashboard": {
|
||||
|
||||
Reference in new issue
Block a user