Gemini Live API (v3.1) suddenly stops streaming audio response intermittently
I’m currently building a real-time AI calling/voice interaction platform using the Gemini Live 3.1 model. The pipeline involves continuous streaming (input → model → TTS/audio output).
However, I’m facing an intermittent issue where the model suddenly stops speaking/outputting audio, and this happens at random times (no consistent duration or trigger).
Details:
The issue is not time-specific (can happen early or after a longer interaction)
No explicit error is thrown when this happens
The pipeline just silently stops producing audio output
Connection appears to remain active (in some cases)
My Setup:
Real-time streaming (likely via WebSocket / streaming API)
Continuous input/output loop
TTS layer for audio playback
What I’ve Checked:
No obvious crashes in the application
No clear API error responses
Happens even with stable input
Questions:
Is there any known timeout/session limit for Gemini Live streaming?
Could this be due to stream interruptions or buffering issues?
Are there recommended best practices for handling:
auto-reconnect
keep-alive/heartbeat
stream recovery?
How can I reliably detect whether the issue is from:
the model stopping generation
or the audio/TTS pipeline failing?
Any guidance, debugging strategies, or similar experiences would be really helpful.
Thanks!