feat(tts): integrate Gemini API text-to-speech#85
Open
RayJiang4S wants to merge 2 commits into
Open
Conversation
Replace the Google TTS provider with the latest Gemini API TTS path, including prompt-directed single-speaker and two-speaker audio generation. Update provider docs, environment examples, and contract coverage for the new API-key based workflow.
Expose reusable Google TTS delivery presets and duration target guidance so narration auditions can carry stable style and pacing instructions into Gemini prompt-directed synthesis.
Author
|
Updated this PR with the Google TTS workflow learnings from a real narration audition pass. What changed:
Validation:
|
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-3.1-flash-tts-preview)GEMINI_API_KEY/GOOGLE_API_KEYWhy
Google's Gemini API TTS docs show
gemini-3.1-flash-tts-previewas a supported TTS model withresponseModalities: [\"AUDIO\"], prebuilt voice config, 24 kHz PCM output, and single/multi-speaker support. This keeps OpenMontage aligned with the current Google TTS path while preserving the existing provider contract and registry discovery style.Verification
gemini-3.1-flash-tts-preview/Kore, producing a 24 kHz mono WAV (5.24s).venv/bin/python -m pytest tests/contracts/test_phase3_contracts.py -q-> 70 passed.venv/bin/python -m compileall tools/audio/google_tts.py tests/contracts/test_phase3_contracts.py-> passedgit diff --check-> passed