Repository navigation
Open
Labels
priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
Summary
In the google-genai Python SDK, types.AudioTranscriptionConfig explicitly declares the diarization: bool field ("Configures speaker diarization").
However, when passing diarization=True to client.interactions.create(model="gemini-3.5-transcribe", ...) with mode="verbatim", the request completes successfully with status completed and word-level timestamps, but speaker diarization is completely silently ignored. None of the returned word/segment annotations contain speaker_label or speaker fields.
Environment Details
- OS: macOS (Darwin arm64)
- Python: 3.13
- SDK:
google-genai(latest) - Model:
gemini-3.5-transcribe
Minimal Reproducible Example
from google import genai
client = genai.Client()
audio_file = client.files.upload(file="two_speaker_interview.wav")
interaction = client.interactions.create(
model="gemini-3.5-transcribe",
input=[{
"type": "audio",
"uri": audio_file.uri,
"mime_type": "audio/wav",
}],
generation_config={
"transcription_config": {
"mode": {"type": "verbatim"},
"timestamp_granularities": ["word"],
"diarization": True, # Explicitly requested
}
},
)
steps = getattr(interaction, "steps", [])
speakers = set()
for step in steps:
for content in getattr(step, "content", []):
for ann in getattr(content, "annotations", []):
spk = ann.get("speaker_label") or ann.get("speaker")
if spk:
speakers.add(spk)
print(f"Status: {interaction.status}")
print(f"Total words: {len(steps)}")
print(f"Detected speakers: {speakers}")
# Output:
# Status: completed
# Total words: 274
# Detected speakers: set()Actual Behavior
The API succeeds with status completed, but:
- Zero speaker labels (
speaker_labelorspeaker) are populated in the annotations. - The API silently discards
diarization=Truewithout any warning or validation error.
Expected Behavior
- Either populate
speaker_label(spk_1,spk_2, etc.) in the annotations as defined in the SDK data schema; - Or raise a validation/not-implemented error informing the caller that
diarizationis not supported forgemini-3.5-transcribe.
Additional Context
Related to earlier report #2923. Unlike earlier versions where requests hung on incomplete, the interaction now completes, but the diarization functionality is dropped silently.
Metadata
Metadata
Assignees
Labels
priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Activity
Venkaiahbabuneelam commentedon Oct 19, 2026
Hi @randyy179, thank you for reporting this issue and providing a clear reproduction snippet!
We have reproduced this behavior where
diarization=Trueintranscription_configforgemini-3.5-transcribecompletes withstatus="completed"but returns no speaker labels (Detected speakers: set()), and we have escalated it to our engineering team.Thanks
treyn-create commentedon Oct 21, 2026
HI @randyy179
Thanks for the detailed report and repro, this was really helpful.
AudioTranscriptionConfig.diarization (a bool) is the field for the generate_content API. The Interactions API (client.interactions.create) uses a different shape: diarization_mode="speaker", nested inside the transcription mode:
Docs: https://ai.google.dev/gemini-api/docs/transcribe#speaker-diarization
Why there was no error: you're right that this should have failed loudly. Right now the SDK accepts unknown fields like diarization and then drops them before the request is sent, so the API never sees the field and can't reject it. That's a bug on our side, and we're tracking a fix so unknown fields are sent to the API and you get a clear error.
In the meantime while we patch the error behavior, hope diarization_mode unblocks you
feat(python): preserve unknown fields and open-union variants in Inte…
feat(python): preserve unknown fields and open-union variants in Inte…
feat(python): preserve unknown fields and open-union variants in Inte…
feat(python): preserve unknown fields and open-union variants in Inte…
feat(python): preserve unknown fields and open-union variants in Inte…
feat(python): preserve unknown fields and open-union variants in Inte…
feat(python): preserve unknown fields and open-union variants in Inte…
feat(python): preserve unknown fields and open-union variants in Inte…
feat(python): preserve unknown fields and open-union variants in Inte…
feat(python): preserve unknown fields and open-union variants in Inte…
2 remaining items
feat(python): preserve unknown fields and open-union variants in Inte…
feat(python): preserve unknown fields and open-union variants in Inte…
feat(python): preserve unknown fields and open-union variants in Inte…
feat(python): preserve unknown fields and open-union variants in Inte…
feat(python): preserve unknown fields and open-union variants in Inte…
feat(python): preserve unknown fields and open-union variants in Inte…
feat(python): preserve unknown fields and open-union variants in Inte…
feat(python): preserve unknown fields and open-union variants in Inte…
feat(python): preserve unknown fields and open-union variants in Inte…
feat(python): preserve unknown fields and open-union variants in Inte…
feat(python): preserve unknown fields and open-union variants in Inte…
feat(python): preserve unknown fields and open-union variants in Inte…
fix: preserve unknown fields and open-union variants in Interactions …
fix: preserve unknown fields and open-union variants in Interactions …
fix: preserve unknown fields and open-union variants in Interactions …