Skip to content

[gemini-3.5-transcribe] AudioTranscriptionConfig.diarization=True is silently ignored without returning speaker labels #3162

Open

Description

@randyy179

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_label or speaker) are populated in the annotations.
  • The API silently discards diarization=True without 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 diarization is not supported for gemini-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.

Activity

  1. added
    priority: p2Moderately-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.
    on Oct 19, 2026
  2. Venkaiahbabuneelam commented on Oct 19, 2026

    @Venkaiahbabuneelam

    Hi @randyy179, thank you for reporting this issue and providing a clear reproduction snippet!
    We have reproduced this behavior where diarization=True in transcription_config for gemini-3.5-transcribe completes with status="completed" but returns no speaker labels (Detected speakers: set()), and we have escalated it to our engineering team.
    Thanks

  3. treyn-create commented on Oct 21, 2026

    @treyn-create

    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

  4. 2 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

priority: p2Moderately-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.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions