Repository navigation
fix(sarvam): keep idle STTRealtime streams open - #8383
Merged
tinalenguyen merged 3 commits intoNov 18, 2026
Merged
Conversation
Sarvam closes a realtime stream after 60 s with no audio (inactivity_timeout, 408). Pings don't reset it and the stream never reconnects, so muted or gated input ended transcription for the rest of the call. A keepalive task now sends 50 ms of silence after 30 s with no audio sent; the silence advances the audio position and is metered like any other audio. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tinalenguyen
left a comment
Member
There was a problem hiding this comment.
hi, thanks for the PR! left a few comments, mainly about how the silence interacts with manual endpointing
_process_audio now wakes up after KEEPALIVE_INTERVAL_S without input and sends the silence itself, so it stays the only audio writer on the socket. Checked live that in manual endpointing Sarvam accepts the silence between utterances without opening one. The keepalive tests run on virtual time. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tinalenguyen
approved these changes
Nov 18, 2026
tinalenguyen
left a comment
Member
There was a problem hiding this comment.
thanks for iterating! left a few small comments, otherwise lgtm
…ive silence Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
neil-sarvam
added a commit
to neil-sarvam/agents
that referenced
this pull request
Nov 19, 2026
Keep the realtime keyterm tests alongside livekit#8383's keepalive tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Split out of #8329 so that each change gets its own PR.
Problem
Sarvam closes a realtime stream after 60 s with no audio (
inactivity_timeout, 408). Pings don't reset that timer, andSTTRealtimenever reconnects (a new connection would be a new session). So muted or gated input ends transcription for the rest of the call.Fix
Testing
inactivity_timeout(408).🤖 Generated with Claude Code