Skip to content

Channel Consumption Bug in Retry Logic (STT/TTS) #4620

@darshankparmar

Description

@darshankparmar

Bug Description

Retry mechanisms in base classes cause data loss in STT and TTS plugins.

When a plugin's _run() method fails and is retried, the _input_ch channel has already been consumed by the first attempt.

Expected Behavior

Retry logic should reprocess the complete input data on subsequent attempts, not partial/empty data.

Reproduction Steps

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

Operating System

Linux (tested), likely affects all platforms

Models Used

No response

Package Versions

livekit-agents=1.3.12

Session/Room/Call IDs

No response

Proposed Solution

Additional Context

No response

Screenshots and Recordings

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions