You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Live session dies with 1011 keepalive ping timeout immediately after first turn_complete (reproducible across gemini-3.1-flash-live-preview, gemini-2.5-flash-native-audio-latest) #2935
Is this a client library issue or a product issue?
Unclear — could be either. The client sends audio correctly with no errors or gaps right up until the disconnect, so the failure appears to originate server-side (the Live backend closing the socket), but I'm filing here first since it reproduces consistently against this SDK's live.connect() / send_realtime_input() API surface. Happy to redirect to Cloud Support if maintainers determine it's purely backend.
Environment details
Programming language: Python
OS: macOS
Language runtime version: <! --python 3.12.14 -->
Package version:
Steps to reproduce
Open a Live session with response_modalities: ["AUDIO"] and input_audio_transcription: {} (automatic VAD, default settings — no manual activity_start / activity_end / audio_stream_end calls).
Stream microphone audio continuously via send_realtime_input(audio=...) in ~100ms PCM chunks (16kHz, 16-bit mono, audio/pcm;rate=16000).
Speak one short utterance (e.g. "Hello").
Model replies with audio (model_turn parts, mime_type=audio/pcm;rate=24000) and correctly sends turn_complete.
Continue streaming mic audio as before — no pause, no manual stream-end signal.
Within roughly one send cycle after turn_complete, the next send_realtime_input call raises:
Hi @himanshu0749, Thanks for reaching out us!
To help us understand the issue, could you please share a code snippet of what you've tried so far?
Thanks
Running this: speak one short utterance, Gemini replies fully (transcription + all audio chunks arrive, turn_complete prints), then the very next send_realtime_input call in send_microphone() raises:
websockets.exceptions.ConnectionClosedError: sent 1011 (internal error) keepalive ping timeout; no close frame received
Hi @himanshu0749, thanks for the reproduction script! We ran it locally and confirmed the exact behavior: the backend unexpectedly drops the WebSocket with a 1011 error immediately after the first turn_complete. I've escalated this directly to the Live API engineering team to investigate the server-side disconnects. Thanks for flagging this.
Activity
Venkaiahbabuneelam commentedon Sep 3, 2026
Hi @himanshu0749, Thanks for reaching out us!
To help us understand the issue, could you please share a code snippet of what you've tried so far?
Thanks
himanshu0749 commentedon Sep 5, 2026
Sure — here's a minimal repro:
Running this: speak one short utterance, Gemini replies fully (transcription + all audio chunks arrive,
turn_completeprints), then the very nextsend_realtime_inputcall insend_microphone()raises:google-genaiversion:<Name: google-genai Version: 2.22.0 Summary: GenAI Python SDK Home-page: https://github.com/googleapis/python-genai Author: Author-email: Google LLC <[email protected]> License-Expression: Apache-2.0>Happy to share a full terminal log if useful.
kkorpal commentedon Sep 8, 2026
Hi @himanshu0749, thanks for the reproduction script! We ran it locally and confirmed the exact behavior: the backend unexpectedly drops the WebSocket with a 1011 error immediately after the first turn_complete. I've escalated this directly to the Live API engineering team to investigate the server-side disconnects. Thanks for flagging this.