Skip to content

Conversation

@KrishnaShuk
Copy link
Contributor

Description

This PR implements robust cleanup logic for the Gemini and Rime TTS plugins by adding an AbortController and a close() method.

Tracking issue #881

Changes Made

  • Added an AbortController and close() method to the TTS class .

Pre-Review Checklist

  • Build passes: All builds (lint, typecheck, tests) pass locally
  • AI-generated code reviewed: Removed unnecessary comments and ensured code quality
  • Changes explained: All changes are properly documented and justified above
  • Scope appropriate: All changes relate to the PR title, or explanations provided for why they're included
  • Video demo: A small video demo showing changes works as expected and did not break any existing functionality using Agent Playground (if applicable)

Testing

  • Automated tests added/updated (if applicable)
  • All tests pass
  • Make sure both restaurant_agent.ts and realtime_agent.ts work properly (for major changes)

Additional Notes


Note to reviewers: Please ensure the pre-review checklist is completed before starting your review.

@changeset-bot
Copy link

changeset-bot bot commented Dec 5, 2025

🦋 Changeset detected

Latest commit: 9473d49

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

This PR includes changesets to release 2 packages
Name Type
@livekit/agents-plugin-google Patch
@livekit/agents-plugin-rime 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
Copy link
Contributor

Hey @KrishnaShuk, I just realized this is not the correct way of handle close for tts / stt, please see #891. I'd also need to revert your previous changes #883.

The correct way should be cancelling the active streams created under the STT / TTS component. Let me double check the gaps and design a way to streamline all plugins cancellation logics. I'm closing this PR for now, but feel free to ask anything!

@toubatbrian toubatbrian closed this Dec 8, 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.

2 participants