fix: keep listening after stopping a voice-conversation reply - #81176
Open
or68097452-sketch wants to merge 1 commit into
Open
or68097452-sketch wants to merge 1 commit into
or68097452-sketch wants to merge 1 commit into
Conversation
Stopping playback mid-reply (the playback Stop button) suppressed the next listen cycle: settleAfterSpeech treated any external stopVoicePlayback as 'user chose to stop' and left pendingStartRef false, wedging an active conversation into idle with the mic never reopening — the user could not continue speaking until manually restarting the conversation. An active conversation must stay live after a Stop: the button silences the current reply, and end() (which clears pendingStartRef itself) is the only path that should end the loop. Re-arm unconditionally when enabled.
Contributor
|
This was generated by AI during triage. Summary: Problems:
Solution: Checked against |
This branch has not been deployed
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
Stopping playback mid-reply (the playback Stop button) suppressed the next listen cycle:
settleAfterSpeechtreated any externalstopVoicePlayback()as "user chose to stop" and leftpendingStartReffalse — wedging an active voice conversation into idle with the mic never reopening. The user could not continue speaking until manually restarting the conversation.An active conversation must stay live after a Stop: the button silences the current reply, and
end()(which clearspendingStartRefitself) is the only path that should end the loop. ThestoppedByUsersequence heuristic is removed; the loop re-arms unconditionally when enabled.Motivation
Reported by a user: in a voice conversation, stopping the spoken reply mid-output made voice input dead — the loop never re-listened.
Test Plan
use-voice-conversation-rearm.test.tsx:re-arms the microphone after an external Stop during streaming playback(regression test — previously asserted the wedge)handle.start×2, statuslistening) while playback stays silenced (stopVoicePlaybackstill fired, no fallbackplaySpeechText)vitest runon both conversation hook test files: 11 passed