voice-command: stop clipping users mid-sentence in conversation mode#18
Merged
Merged
Conversation
Conversation follow-up turns set Google STT's single_utterance mode on, handing end-of-speech detection to Google's VAD, which commits ~200-500ms after any pause and clips users mid-sentence on natural pauses. No config attribute could override it. Turn single_utterance OFF in conversation mode too (it was already off in wake mode), so our own stable-endpoint timer governs the commit instead. That timer resets on every new word, so it only fires once the user has truly stopped, and is tunable via stable_endpoint_ms. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Julie Krasnick (jckras)
requested review from
Esha Maharishi (EshaMaharishi) and
Nicolas Palpacuer (NickPPC)
and removed request for
Esha Maharishi (EshaMaharishi)
June 24, 2026 14:14
Esha Maharishi (EshaMaharishi)
approved these changes
Jun 24, 2026
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.
Problem
Conversation follow-up turns cut users off ~200-500ms after they pause — clipping them mid-sentence on natural pauses. No config attribute could fix it.
Cause
listenForCommandset Google STT'sSingleUtterancetostartInConversation(voice-command.go:895), i.e. on during conversation. Single-utterance mode hands end-of-speech detection to Google's VAD, which ends the turn on the first short pause regardless of ourstable_endpoint_ms/listen_timeout_secknobs.Fix
Set
SingleUtterance: falsein both modes (wake mode already had it off). With it off, the STT stream stays open and our own stable-endpoint timer governs the commit. That timer resets on every new word (onContentChange), so it only fires once the user has truly stopped — and it's tunable viastable_endpoint_ms.Net effect: conversation pause-tolerance goes from a fixed ~300ms to our tunable timer (default ~500ms, resettable on each word) with Google's
is_final(~1-2s) as the ceiling.Caveat
Maximum patience is still bounded by Google's
is_final(~1-2s) atvoice-command.go:1126. Extending beyond that is a separate, riskier change.Testing
Build + vet pass. Not yet verified on hardware — should be tested on a live machine to confirm conversation turn-taking feels right.
🤖 Generated with Claude Code