tts: add Gemini native TTS provider#30
Open
chantskevin wants to merge 2 commits intocalesthio:mainfrom
Open
Conversation
Adds a new TTS provider that uses Gemini's generateContent API with response_modalities=["AUDIO"] for expressive, context-aware speech. Supports 30 voices, 3 models (flash/pro), automatic language detection, and prompt-directed delivery. Auto-discovered by the TTS selector. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Guard against missing/blocked candidates and safety filter rejections - Extract API error body instead of losing it via raise_for_status() - Reject empty PCM audio instead of writing a silent 0-second WAV - Remove redundant ext variable (audio_format already constrained by enum) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
chantskevin
added a commit
to chantskevin/OpenMontage
that referenced
this pull request
Apr 19, 2026
tts: add Gemini native TTS provider Adds gemini_tts provider using Gemini's generateContent API with response_modalities=["AUDIO"]. 30 voices, flash/pro models, auto-discovered by tts_selector. Same GOOGLE_API_KEY/GEMINI_API_KEY as existing Google TTS tool. Includes hardening: guards against missing/blocked candidates and safety-filter rejections, extracts API error body, rejects empty PCM. Merged locally onto fork ahead of upstream PR calesthio#30.
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.
Summary
gemini_ttsprovider tool using Gemini'sgenerateContentAPI withresponse_modalities=["AUDIO"]GOOGLE_API_KEY/GEMINI_API_KEYas existing Google TTS toolTest plan
preferred_provider: "gemini"gemini-2.5-pro-preview-tts)🤖 Generated with Claude Code