fix(huddle): fade partial streaming TTS on inference failure - #6332
Draft
johnmatthewtennant wants to merge 2 commits into
Draft
fix(huddle): fade partial streaming TTS on inference failure#6332johnmatthewtennant wants to merge 2 commits into
johnmatthewtennant wants to merge 2 commits into
Conversation
johnmatthewtennant
force-pushed
the
jtennant/harden-pocket-tts-streaming
branch
from
August 19, 2026 18:33
df5c133 to
b348a00
Compare
johnmatthewtennant
force-pushed
the
jtennant/harden-pocket-tts-streaming
branch
2 times, most recently
from
August 19, 2026 18:51
2b01e7f to
f445345
Compare
Signed-off-by: John Tennant <jtennant@squareup.com>
Signed-off-by: John Tennant <jtennant@squareup.com>
johnmatthewtennant
force-pushed
the
jtennant/harden-pocket-tts-streaming
branch
from
August 19, 2026 19:03
f445345 to
0a4010a
Compare
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.
Context
PR #5671 added an env-gated Pocket TTS streaming path that queues decoded audio while synthesis continues. If inference fails after emitting multiple blocks, the existing error path drops the retained final block. Already queued audio then ends abruptly without the normal fade-out.
This is a bug fix for the streaming path. It also carries forward the error and cancellation hardening worth preserving from #3257 without reusing that PR's older synthesis implementation.
Summary
Finish a partially emitted stream through the existing playback-boundary decorator when inference fails. The retained tail receives the normal final fade, while previously queued speech remains intact.
Changes
Related issue
No issue found. Follow-up to #5671. Supersedes the streaming error and cancellation hardening from #3257.
Testing
The deterministic regression harness simulates a Pocket inference error after two audio callbacks. The target behavior queues one block and drops the retained tail; this branch queues both blocks and fades the final sample to zero.
The live desktop app has no safe deterministic control for forcing an inference failure after audio has already been emitted, so this specific error path was not manually injected in a real huddle. Normal streaming behavior remains env-gated in this PR.
Screenshots
Not applicable. This changes the native audio pipeline and has no visual UI change.
Reviewer-reproducible examples
The reproduction branch is
origin/mainplus only the private test seam and regression assertions. It intentionally retains the old error behavior.Red: target behavior drops the retained tail
Observed output:
Green: the retained tail is queued with a fade
Observed output: