fix: continue recording after barge-in interrupts TTS#281
Open
aydiler wants to merge 1 commit intombailey:feat/VM-606-barge-in-interrupt-tts-playback-when-user-startsfrom
Open
Conversation
The barge-in monitor captures a small audio buffer (~0.5s) during TTS playback until the interrupt triggers. However, the user is typically still speaking after TTS stops. The current code skips normal recording when barge-in occurs, sending only the tiny buffer to STT, which results in poor or nonsensical transcriptions. This fix continues recording with silence detection after TTS is interrupted, then prepends the barge-in buffer to the continuation audio. This ensures the user's full utterance is captured and transcribed correctly.
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.
Summary
Fix
After barge-in interrupts TTS, continue recording with silence detection (same as normal flow, but skip the pause and chime since the user is already speaking). Prepend the barge-in buffer to the continuation audio before sending to STT.
Before: ~5-7KB audio, gibberish transcription
After: ~100-130KB audio, correct transcription of full sentence
Test plan
conversewith a long message, interrupt by speaking mid-TTS