agents icon indicating copy to clipboard operation
agents copied to clipboard

Broken streaming tts retries

Open jayeshp19 opened this issue 3 weeks ago • 2 comments

Bug Description

it looks like streaming TTS retries are broken. The retry loop reuses the same SynthesizeStream instance, but the _input_ch channel and plugin state are one-shot resources that get consumed during the first attempt.

As a result, retrying the same request sends no text or produces no segments, leading to consistent failures like APIError: no audio frames were pushed or segments mismatch.

related issues: https://github.com/livekit/agents/issues/4135

Expected Behavior

we should be able to replay events during retry

Reproduction Steps

1. 
2.
3.
...
- Sample code snippet, or a GitHub Gist link -

Operating System

Macos

Models Used

No response

Package Versions

livekit-agents=1.3.10

Session/Room/Call IDs

No response

Proposed Solution


Additional Context

No response

Screenshots and Recordings

No response

jayeshp19 avatar Dec 29 '25 19:12 jayeshp19