Google AI Studio Multi-Speaker TTS
Scripted conversations with Gemini TTS
- audio
The annoying part of any "AI podcast" or interview video isn't writing the script - it's making two characters sound like different people. Most TTS setups make you generate each line separately and stitch them together, and the voices bleed together in a way that never quite works. This node fixes that by sending the whole conversation to Google's Gemini TTS in one call, with an explicit voice assigned to each speaker. You get a single AUDIO clip where the voices genuinely alternate.
It's the sibling of the single-speaker Google AI Studio TTS node, with the same install, the same API key, and the same 30-voice pool. The only difference is the transcript format and the speaker mapping.
How it works
You write a transcript where every line starts with a speaker name and a colon:
Dr. Anya: Welcome to our show!
Liam: Thanks for having me, it's great to be here!
The node pairs each speaker name in the transcript with a voice you assign via the speaker1_name/speaker1_voice, speaker2_name/speaker2_voice (and optional 3 and 4) fields, builds a MultiSpeakerVoiceConfig mapping, and sends the whole transcript as one generate_content call with audio modality. The returned audio is decoded into the standard ComfyUI AUDIO format - a waveform tensor plus sample rate.
The one rule that actually matters: the names in your transcript must match the speaker name fields exactly. "Dr. Anya" in the transcript won't match "Anya" in speaker1_name. Keep them identical, or the voice mapping won't do what you expect.
The inputs that matter
- transcript - multiline,
Name: dialoguelines. This is the whole script. - api_key - your Google AI Studio key.
- model -
gemini-2.5-flash-preview-ttsorgemini-2.5-pro-preview-tts. - speaker1_name / speaker1_voice and speaker2_name / speaker2_voice - required. The voice dropdowns list all 30 voices with their style labels (Kore (Firm), Puck (Upbeat), Zephyr (Bright)…).
- speaker3_name / speaker3_voice, speaker4_name / speaker4_voice - optional; leave the name empty to skip that speaker.
Output is audio (AUDIO), which plugs into PreviewAudio or any ComfyUI audio save/output node.
Installing it
Identical to the rest of the pack. ComfyUI Manager, search "Google AI Studio," or:
cd ComfyUI/custom_nodes
git clone https://github.com/BuffMcBigHuge/ComfyUI-Google-AI-Studio.git
cd ComfyUI-Google-AI-Studio
pip install -r requirements.txt
The only dependency is google-genai>=1.66.0, and there are no model files to download. Restart ComfyUI, look under the "Google AI Studio" menu.
Where people get burned
Beyond the speaker-name matching trap, the usual issues are quota and context. The whole transcript goes in one request, so keep it comfortably under the 32k token window - long interviews should be split into segments and generated separately, then stitched in ComfyUI. And as with everything in this pack, it's a Google-hosted API: rate limits, no offline mode, and a strict safety filter. For a quick narrated dialogue or podcast teaser, it's shockingly little work for the result.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| transcript | STRING | Dr. Anya: Welcome to our show! Liam: Thanks for having me, it's great to be here! | Multi-speaker transcript with speaker names followed by colons |
| api_key | STRING | Your Google AI Studio API key | |
| model | COMBO | gemini-2.5-flash-preview-tts | 2 options: gemini-2.5-flash-preview-tts, gemini-2.5-pro-preview-tts |
| speaker1_name | STRING | Dr. Anya | Name of the first speaker |
| speaker1_voice | COMBO | Kore (Firm) | 30 options: Zephyr (Bright), Puck (Upbeat), Charon (Informative), Kore (Firm), Fenrir (Excitable), Leda (Youthful), +24 |
| speaker2_name | STRING | Liam | Name of the second speaker |
| speaker2_voice | COMBO | Puck (Upbeat) | 30 options: Zephyr (Bright), Puck (Upbeat), Charon (Informative), Kore (Firm), Fenrir (Excitable), Leda (Youthful), +24 |
| speaker3_nameopt | STRING | Name of the third speaker (optional) | |
| speaker3_voiceopt | COMBO | Zephyr (Bright) | 30 options: Zephyr (Bright), Puck (Upbeat), Charon (Informative), Kore (Firm), Fenrir (Excitable), Leda (Youthful), +24 |
| speaker4_nameopt | STRING | Name of the fourth speaker (optional) | |
| speaker4_voiceopt | COMBO | Charon (Informative) | 30 options: Zephyr (Bright), Puck (Upbeat), Charon (Informative), Kore (Firm), Fenrir (Excitable), Leda (Youthful), +24 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| audio | AUDIO | — |