Skip to content

voice-command: stop clipping users mid-sentence in conversation mode#18

Merged
Julie Krasnick (jckras) merged 2 commits into
mainfrom
voice-command-listen-longer
Jun 24, 2026
Merged

voice-command: stop clipping users mid-sentence in conversation mode#18
Julie Krasnick (jckras) merged 2 commits into
mainfrom
voice-command-listen-longer

Conversation

@jckras

Copy link
Copy Markdown
Contributor

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

listenForCommand set Google STT's SingleUtterance to startInConversation (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 our stable_endpoint_ms / listen_timeout_sec knobs.

Fix

Set SingleUtterance: false in 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 via stable_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) at voice-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

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]>
@jckras
Julie Krasnick (jckras) merged commit 305e21a into main Jun 24, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants