googleapis / googleapis/python-genai

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)

Open
#2,935 3 comments 0 reactions 1 assignee Claimed by @Venkaiahbabuneelam View on GitHub
priority: p2 type: bug
Dominant language
Python
Stars
4k
Forks
1k
Avg merge
2d 11h
Merged PRs (30d)
40

Description

### 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:
- Package version:

#### Steps to reproduce

1. 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).
2. Stream microphone audio continuously via `send_realtime_input(audio=...)` in ~100ms PCM chunks (16kHz, 16-bit mono, `audio/pcm;rate=16000`).
3. Speak one short utterance (e.g. "Hello").
4. Model replies with audio (`model_turn` parts, `mime_type=audio/pcm;rate=24000`) and correctly sends `turn_complete`.
5. Continue streaming mic audio as before — no pause, no manual stream-end signal.
6. Within roughly one send cycle after `turn_complete`, the next `send_realtime_input` call raises:

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.