Skip to content

Fix the memory leak of Google STT when no audio input.#5591

Open
jmuk wants to merge 1 commit intolivekit:mainfrom
jmuk:google-stt-memory-leak-fix
Open

Fix the memory leak of Google STT when no audio input.#5591
jmuk wants to merge 1 commit intolivekit:mainfrom
jmuk:google-stt-memory-leak-fix

Conversation

@jmuk
Copy link
Copy Markdown

@jmuk jmuk commented Apr 28, 2026

When the RTC session is idle without any audio input, Google STT re-create the client object and re-connect periodically. However some old resources actually remain as they're not cancelled properly, causing memory leak.

This PR adds the clean-up of such scenarios. With this change, I confirmed my experience of the memory leak is gone.

Fixes #5590

When the RTC session is idle without any audio input, Google STT
re-create the client object and re-connect periodically. However
some old resources actually remain as they're not cancelled
properly, causing memory leak.

This PR adds the clean-up of such scenarios.  With this change,
I confirmed my experience of the memory leak is gone.

Fixes livekit#5590
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 28, 2026

CLA assistant check
All committers have signed the CLA.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

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.

Google STT has a memory leak when an agent session is running with no audio input from the user

2 participants