googleapis / googleapis/python-genai
[ Critical BUG] Gemini Live API Call Bot: Bot Abruptly Stops Speaking or Skips Words Mid-Sentence
- Dominant language
- Python
- Stars
- 4k
- Forks
- 1k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 40
Description
**Title:** [BUG] Gemini Live API Call Bot: Bot Abruptly Stops Speaking or Skips Words Mid-Sentence
**Description:**
We are experiencing inconsistent performance issues with the Gemini Live API using the `models/gemini-2.5-flash-native-audio-preview-09-2025` and `gemini-2.0-flash-live-001` models for our call bot application. This bug manifests in two primary ways, severely impacting the user experience.
---
**Case 1: Bot Completely Stops Speaking and No Text Is Returned**
* **Steps to Reproduce:**
1. Initiate a call with the bot.
2. Engage in a multi-turn conversation.
3. At some point during a bot's response, the bot's audio cuts out completely.
* **Observed Behavior:**
The bot is in the middle of a sentence, and the audio stream stops entirely. The call goes silent. Concurrently, no text output is returned from the API for that specific response. The user receives neither audio nor text.
* **Expected Behavior:**
The bot should complete its spoken response seamlessly, and the API should return the full corresponding text content.
---
**Case 2: Bot's Speech Skips Words, but Full Text Is Returned**
* **Steps to Reproduce:**
1. Initiate a call with the bot.
2. Engage in a conversation.
3. Listen carefully to the bot's responses.
* **Observed Behavior:**
While the bot is speaking its response, the audio feed drops or pauses momentarily, causing one or more words to be missing from the sentence. However, when checking the API logs, the full and correct text for the response has been successfully returned.
* **Example:** The bot is supposed to say, "I am happy to assist you today," but the user might only hear, "I am happy to... you today."
* **Expected Behavior:**
The audio generated by the bot should perfectly match the text content returned by the API, with no interruptions or missing words.
**Environment Details:**
* **API Models:** `models/gemini-2.5-flash-native-audio-preview-09-2025`, `gemini-2.0-flash-live-001`
* **Frequency:** The issue occurs intermittently and randomly, making it difficult to predict and handle gracefully.
* **Python Version:** 3.12
* **Library Version:** `google-genai==1.45.0`
* **Models Tested:** `gemini-live-2.5-flash-preview`, `gemini-2.0-flash-live-001`
* **Input Language:** Vietnamese
* **ASR Configuration:** Set to Vietnamese (`vi-VN")
## Configs:
```json
{
"generation_config": {
"top_p": 0.8,
"top_k": 5,
"max_output_tokens": 18560
},
"temperature": 0.2,
"language": "vi-VN",
"voice": "leda",
"realtime_input_config": {
"prefix_padding_ms": 150,
"silence_duration_ms": 700
},
"context_window_compression": {
"trigger_tokens": 51200,
"target_tokens": 3840
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.