Repository navigation
agent: keep the command that follows the wake word - #27
Merged
Merged
Conversation
The wake spotter verifies a candidate before reporting it, so on a loaded host the server asks the speaker to listen about a second after the wake word. A command said without a pause after it («Маруся, который час») is over by then: the turn is transcribed as empty and the speaker stays silent. A pause after the wake word hid the problem. Keep the last five seconds of idle microphone audio and replay it through the endpointer when listening starts. The buffered frames already passed the noise floor and the high-pass filter, so the buffered speech goes out with the turn as usual. The high-pass filter is new as well: room rumble can sit only a few dB below speech in a quiet room, and the endpointer compares speech with the floor. Filtering below 180 Hz gives quiet speech more headroom, and the «no speech detected» log now includes the peak and the floor in dBFS, so a muted microphone is not mistaken for a quiet one.
ryysel
force-pushed
the
pr/agent-hearing
branch
from
November 2, 2026 03:37
1644700 to
9c55493
Compare
yawaflua
approved these changes
Nov 3, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two fixes in the agent's microphone path, found while debugging «the ring shows listening, but the speaker answers nothing».
Why
The wake spotter verifies a candidate with the full Vosk vocabulary before reporting a hit, which adds about a second. If the whole phrase is «Маруся, который час», the audio is over before the agent starts listening, so the recorded turn is silence and the transcription is empty. A pause after the wake word hid the problem. Replaying the idle buffer recovers the phrase.
The filter addresses a quiet room where rumble sat only 6–9 dB below speech: the endpointer compares speech with the noise floor, and a quiet speaker could stay under the threshold forever. The new log fields separate a quiet speaker from a muted or broken microphone.
Testing
go test ./internal/audio/ ./internal/agent/