googleapis / googleapis/python-genai

gemini-3.5-transcribe Interactions API hangs and returns status: incomplete when passing transcription_config for Diarization

Open
#2,923 1 comment 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

### **Issue Title:**
`gemini-3.5-transcribe` Interactions API hangs and returns `status: incomplete` when passing `transcription_config` for Diarization

### **Description**
When using the newly announced `gemini-3.5-transcribe` model for pre-recorded audio via the `client.interactions.create` API, the configuration syntax provided in the announcement email does not work with the current Python SDK, and attempting to work around it causes the backend to fail.

There are two distinct issues occurring:

**1. The documentation/email syntax throws a local exception:**
The announcement email states we should use the `config` kwarg:
```python
interaction = client.interactions.create(
model="gemini-3.5-transcribe",
config=dict(transcription_config=dict(...))
)
```
In `google-genai` version 2.17.0, this immediately throws a local exception:
`TypeError: create() got unexpected keyword argument(s): config. Use extra_body=... to send additional request body fields.`

**2. The workaround syntax causes a backend freeze:**
If we instead pass the configuration via `generation_config` (which is standard for Gemini models):
```python
interaction = client.interactions.create(
model="gemini-3.5-transcribe",
generation_config={"transcription_config": { ... }}
)
```
The SDK accepts this, but the API blocks for ~72 seconds and returns an interaction object stuck in `"status": "incomplete"`. The `output_text` truncates to just the first two words of the audio file (e.g., "Hello. Hello.") despite the usage block confirming that the entire audio file was tokenized (e.g., 6,325 audio tokens for a 4-minute file).

Polling `client.interactions.get()` indefinitely yields `"status": "incomplete"`.

**Crucially**, if the `generation_config` block is completely removed, the API successfully processes the exact same 4-minute audio file synchronously in ~36 seconds, returns `"status": "completed"`, and outputs the full 28,000-character transcript. However, this drops the speaker diarization and word-level timestamps since the config is missing.

### **Environment details**
* **OS:** Windows
* **Python version:** 3.13
* **SDK version (`pip show google-genai`):** 2.17.0
* **Model:** `gemini-3.5-transcribe`

### **Steps to reproduce**
1. Upload an audio file (e.g., 4 minutes long) using `client.files.upload`.
2. Call `client.interactions.create` and pass the `transcription_config` dictionary exactly as shown in the announcement email.

**Code Snippet that FAILS LOCALLY (From Email):**
```python
import time
from google import genai

client = genai.Client(api_key='YOUR_API_KEY')
audio_file = client.files.get(name='files/YOUR_FILE_ID')

interaction = client.interactions.create(
model="gemini-3.5-transcribe",
input=[{
"type": "audio",
"uri": audio_file.uri,
"mime_type": audio_file.mime_type,
}],
config={
"transcription_config": {
"language_codes": ["hi-IN", "en-US"],
"mode": {
"type": "verbatim",
"diarization_mode": "speaker",
"timestamp_granularities": ["word"],
}
}
}
)
# Output: TypeError: create() got unexpected keyword argument(s): config
```

**Code Snippet that FAILS ON BACKEND (Hangs on Incomplete):**
```python
# ... same as above, but using generation_config ...
interaction = client.interactions.create(
model="gemini-3.5-transcribe",
input=[{
"type": "audio",
"uri": audio_file.uri,
"mime_type": audio_file.mime_type,
}],
generation_config={
"transcription_config": {
"language_codes": ["hi-IN", "en-US"],
"mode": {
"type": "verbatim",
"diarization_mode": "speaker",
"timestamp_granularities": ["word"],
}
}
}
)

print(interaction.status) # Output: "incomplete"
print(interaction.output_text) # Output: "Hello. Hello." (Truncated)
```

**Code Snippet that SUCCEEDS (But lacks diarization):**
```python
# ... same as above ...
# Removing generation_config fixes the freeze, but we lose diarization.
interaction = client.interactions.create(
model="gemini-3.5-transcribe",
input=[{
"type": "audio",
"uri": audio_file.uri,
"mime_type": audio_file.mime_type,
}]
)

print(interaction.status) # Output: "completed"
print(len(interaction.output_text)) # Output: 28325 (Full transcript successfully processed)
```

### **Expected Behavior**
The `interactions.create` endpoint should accept the diarization configuration and return the full transcript with speaker labels and timestamps, rather than getting stuck in an `"incomplete"` state. The announcement documentation must be updated to match the current SDK, or the SDK must be updated to accept the `config` keyword argument for this endpoint.

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.