Repository navigation
fix: stop realtime TTS after final message - #821
Open
tylergibbs1 wants to merge 1 commit into
Open
tylergibbs1 wants to merge 1 commit into
tylergibbs1 wants to merge 1 commit into
Conversation
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
This changes only realtime_tts.py and tests, both of which are hand maintained according to .fernignore.
testing
Pytest and Ruff are not installed in the local workspace, so the repository CI will run those checks.
Fixes #569
Note
Low Risk
Small, targeted change to hand-maintained realtime streaming logic with a focused unit test; no auth or data-model impact.
Overview
Fixes
convert_realtimeso the post-input WebSocket drain loop exits when the API marks the stream complete withisFinal, instead of reading until the connection closes.Audio on the final frame is still decoded and yielded before the generator stops, which avoids hanging or extra
recvcalls after generation ends.Adds
test_convert_realtime_stops_after_final_messageto assert a single read and that no further socket reads occur after the final message.Reviewed by Cursor Bugbot for commit 82c5263. Bugbot is set up for automated code reviews on this repo. Configure here.