Skip to content

Add ConnectionPool for Inference TTS + Fix interruption handling to prevent transcript “spill”#910

Merged
toubatbrian merged 9 commits intomainfrom
brian/ws-connection-pool
Dec 18, 2025
Merged

Add ConnectionPool for Inference TTS + Fix interruption handling to prevent transcript “spill”#910
toubatbrian merged 9 commits intomainfrom
brian/ws-connection-pool

Conversation

@toubatbrian
Copy link
Copy Markdown
Contributor

@toubatbrian toubatbrian commented Dec 12, 2025

  • Fix voice interruption behavior by clearing audio buffer immediately on interrupt and only treating playback as “completed” when playbackPosition is near the end, preventing full-text transcript spill after stop.

  • Add ConnectionPool to reduce reconnecting TTS websockets for consecutive TTS requests.

Changes has been tested on all TTS including agent handoffs scenarios and interruption handling

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Dec 12, 2025

🦋 Changeset detected

Latest commit: 1b41ebe

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 15 packages
Name Type
@livekit/agents Patch
@livekit/agents-plugin-anam Patch
@livekit/agents-plugin-bey Patch
@livekit/agents-plugin-cartesia Patch
@livekit/agents-plugin-deepgram Patch
@livekit/agents-plugin-elevenlabs Patch
@livekit/agents-plugin-google Patch
@livekit/agents-plugin-inworld Patch
@livekit/agents-plugin-livekit Patch
@livekit/agents-plugin-neuphonic Patch
@livekit/agents-plugin-openai Patch
@livekit/agents-plugin-resemble Patch
@livekit/agents-plugin-rime Patch
@livekit/agents-plugin-silero Patch
@livekit/agents-plugins-test Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@toubatbrian toubatbrian changed the title [draft] TTS Connection Pool TTS Connection Pool Dec 12, 2025
@toubatbrian toubatbrian requested a review from a team December 12, 2025 12:00
@toubatbrian toubatbrian changed the title TTS Connection Pool Fix interruption handling to prevent transcript “spill” + Add ConnectionPool for Inference TTS Dec 12, 2025
@toubatbrian toubatbrian changed the title Fix interruption handling to prevent transcript “spill” + Add ConnectionPool for Inference TTS Add ConnectionPool for Inference TTS + Fix interruption handling to prevent transcript “spill” Dec 12, 2025
Copy link
Copy Markdown
Member

@davidzhao davidzhao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work!

Comment thread agents/src/voice/transcription/synchronizer.ts Outdated
@toubatbrian toubatbrian requested review from a team and davidzhao December 15, 2025 06:42
@toubatbrian toubatbrian merged commit 6eeba4a into main Dec 18, 2025
8 checks passed
@toubatbrian toubatbrian deleted the brian/ws-connection-pool branch December 18, 2025 06:08
@github-actions github-actions Bot mentioned this pull request Dec 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants