Repository navigation
feat(cli): use gemini-3.5-transcribe as default model for transcribe command - #3248
Merged
Merged
Conversation
copybara-service
Bot
force-pushed
the
copybara/1009314715
branch
7 times, most recently
from
October 29, 2026 21:25
1af8be5 to
8d0b018
Compare
…command - Switch the `transcribe` default model to `gemini-3.5-transcribe` and add `gemini-3.5-transcribe` to the `Model` enum (catalog group `Speech`). - For dedicated `*-transcribe` models, send only the audio block with `generation_config.transcription_config` (verbatim mode with `diarization_mode: "speaker"` and `timestamp_granularities: ["word"]` per `--no-speakers`/`--no-timestamps`), and render `md`, `text`, `json`, and `srt` from the returned `word_info` annotations. Segment text is cut from the response text by the annotations' byte indices, so the model's punctuation and spacing are kept (including languages written without spaces); speakers are numbered `Speaker 1`, `Speaker 2`, ... by first appearance (the API's raw labels, e.g. `spk:0`, are opaque); SRT cues split at sentence ends and are capped at 7 s / 84 bytes including the speaker prefix; a sentence's last word may overrun by a bounded amount rather than be stranded alone. md/text warn when the response has no word-level annotations. - `gemini-3.5-transcribe` accepts audio only: video inputs fall back to `gemini-3.8-flash` when `--model` is not set, and an explicit `--model gemini-3.5-transcribe` with a video input is a usage error; for audio-only WebM (`.webm` maps to `video/webm`), both point at `--mime-type audio/webm`. A request rejected (HTTP 400) while speaker labels or timestamps are on points at the documented 30-minute limit for those features and suggests splitting the recording, `--no-speakers --no-timestamps`, or `--model gemini-3.8-flash`. Under `--dry-run`, a `files/<id>` input (whose type is only known after `files.get`) notes that a video would use `gemini-3.8-flash`. Each JSON result now reports the model that served it. - General multimodal models (for example `-m gemini-3.8-flash`) keep the prompt plus `response_format` JSON schema path. - `transcribe --help` shows the video fallback model and links to https://ai.google.dev/gemini-api/docs/transcribe. Fixes google-gemini/gemini-api-cli#144 PiperOrigin-RevId: 1009969008
copybara-service
Bot
force-pushed
the
copybara/1009314715
branch
from
October 29, 2026 21:32
8d0b018 to
b18fd3c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(cli): use gemini-3.5-transcribe as default model for transcribe command
transcribedefault model togemini-3.5-transcribeand addgemini-3.5-transcribeto theModelenum (catalog groupSpeech).*-transcribemodels, send only the audio block withgeneration_config.transcription_config(verbatim mode withdiarization_mode: "speaker"andtimestamp_granularities: ["word"]per--no-speakers/--no-timestamps), and rendermd,text,json, andsrtfrom the returnedword_infoannotations. Segment text is cut from the response text by the annotations' byte indices, so the model's punctuation and spacing are kept (including languages written without spaces); speakers are numberedSpeaker 1,Speaker 2, ... by first appearance (the API's raw labels, e.g.spk:0, are opaque); SRT cues split at sentence ends and are capped at 7 s / 84 bytes including the speaker prefix; a sentence's last word may overrun by a bounded amount rather than be stranded alone. md/text warn when the response has no word-level annotations.gemini-3.5-transcribeaccepts audio only: video inputs fall back togemini-3.8-flashwhen--modelis not set, and an explicit--model gemini-3.5-transcribewith a video input is a usage error; for audio-only WebM (.webmmaps tovideo/webm), both point at--mime-type audio/webm. A request rejected (HTTP 400) while speaker labels or timestamps are on points at the documented 30-minute limit for those features and suggests splitting the recording,--no-speakers --no-timestamps, or--model gemini-3.8-flash. Under--dry-run, afiles/<id>input (whose type is only known afterfiles.get) notes that a video would usegemini-3.8-flash. Each JSON result now reports the model that served it.-m gemini-3.8-flash) keep the prompt plusresponse_formatJSON schema path.transcribe --helpshows the video fallback model and links to https://ai.google.dev/gemini-api/docs/transcribe.Fixes google-gemini/gemini-api-cli#144
FUTURE_COPYBARA_INTEGRATE_REVIEW=#3209 from googleapis:release-please--branches--main 39c95f2