Gemini TTS (y277an)
A voice for your silent video, without leaving ComfyUI
- audio
- log
Once your video pipeline gets good enough to want a voice, you want one without rebuilding your graph around a separate TTS server. Gemini TTS (y277an) is that node: text in, a ComfyUI AUDIO out, done. It calls Google's Gemini TTS models with your AI Studio key, so the actual speech synthesis happens on Google's side - your part is picking a voice and deciding whether the two-line dialogue mode is worth it (it is).
Why you'd reach for it
Audio is the layer this ecosystem bolted on late, and the honest landscape is: local models closed the cloning gap, but the API still wins where reliability and language coverage matter. Gemini TTS sits in that winning corner. It's genuinely multilingual, has 30 prebuilt voices that all sound like actual humans, and it costs pennies per generation. If your alternative was wiring in ElevenLabs, this is the cheaper sibling that's already in your Google billing.
The niche nobody else in the pack fills: narration for a Wan or Veo clip, or a two-voice dialogue without training or cloning anything. The node even ships a multi-speaker mode - set speaker2_voice and write your text as Speaker1: ... / Speaker2: ..., and Gemini returns both parts in one shot with the speaker names you configured.
How it works
The node calls generate_content with response_modalities=["Audio"] and a speech config that names the voice - the same Gemini API you're already using for the image and text nodes in this pack. Google returns PCM audio, which the node wraps into ComfyUI's AUDIO format (24 kHz mono) and hands you as a first-class output. That's the whole mechanism: no local model, no weights, no VRAM. A language_code input (e.g. en-US, cmn-CN) is optional; leave it empty and Gemini auto-detects from the text.
House rules apply as usual: key from the node field, config.json, or GEMINI_API_KEY env; retries on transient errors; and a content-addressed cache so re-running the same text returns instantly without re-billing you.
The inputs that matter
Required: text, model, and voice. The model defaults to gemini-2.5-flash-preview-tts with two siblings (including gemini-3.1-flash-tts-preview); voice picks from 30 prebuilt voices (Kore is the default, all named after moons and stars).
language_code- override for a specific locale; empty = auto.speaker2_voice- set it and the node flips to two-voice mode; pair withspeaker1_name/speaker2_nameto rename the speakers your text addresses.use_cache- on by default.api_key- leave empty unless you're overriding config.json / env.
Outputs: audio (AUDIO) and log (STRING). Wire the audio into SaveAudio or PreviewAudio - that's the standard move. The log tells you the model, voice, language, size, and rate.
Install
Shared with the pack - one clone, all four nodes:
cd /path/to/ComfyUI/custom_nodes
git clone https://github.com/y277an/ComfyUI-y277an-Gemini.git
/path/to/ComfyUI/python -m pip install google-genai pillow numpy
cd ComfyUI-y277an-Gemini
cp config.json.example config.json # paste your Google AI Studio key
Restart ComfyUI. No model downloads.
Gotchas
- Failure looks like silence, not an error. Missing key or a failed call returns a silent audio clip with the problem in the
logstring. Wire the log somewhere you'll see it, or you'll spend a while wondering why your video has no sound. - It's a Google model, so it refuses. A closed TTS you can't abliterate; if the text trips the content filter, you get silence and an error. For uncensored voice work, local Chatterbox or Kokoro is the detour.
- 24 kHz mono is the voice layer, not a mix. It's clean narration-grade audio. If you want a produced track, route it into your audio post-processing nodes afterward.
- Multi-speaker needs the markup. The two-voice mode keys off the
Speaker1:/Speaker2:prefixes in your text - write dialogue without them and you'll hear one voice wondering where the other went.
For a narrator that costs pennies, speaks your language, and lives inside the graph, this is the easiest TTS door in the pack - just don't skip reading the log.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | Hello from Gemini. | — |
| model | COMBO | gemini-2.5-flash-preview-tts | 3 options: gemini-2.5-flash-preview-tts, gemini-2.5-pro-preview-tts, gemini-3.1-flash-tts-preview |
| voice | COMBO | Kore | 30 options: Zephyr, Puck, Charon, Kore, Fenrir, Leda, +24 |
| api_keyopt | STRING | — | |
| use_cacheopt | BOOLEAN | true | — |
| language_codeopt | STRING | — | |
| speaker2_voiceopt | COMBO | (none) | 31 options: (none), Zephyr, Puck, Charon, Kore, Fenrir, +25 |
| speaker1_nameopt | STRING | Speaker1 | — |
| speaker2_nameopt | STRING | Speaker2 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| audio | AUDIO | — |
| log | STRING | — |