Nodes/ComfyUI-Google-AI-Studio/Google AI Studio TTS
ComfyUI Node

Google AI Studio TTS

Podcast narration without downloading a single TTS model

By BuffMcBigHuge·Created about a year ago·Updated 6 months ago· 11
Google AI Studio TTS
    • audio
    textHello! This is a test of Google AI Studio text-to-speech.
    api_key
    modelgemini-2.5-flash-preview-tts
    voiceKore (Firm)
    instruction_prefixSay cheerfully:

    If you've ever built a video workflow and realized the last mile is a voiceover, you know the pain: local TTS options are fiddly, Elevenlabs costs money, and your own voice doesn't fit the vibe. This node is the shortcut. It sends your text to Google's Gemini TTS models and hands back a ComfyUI AUDIO tensor - 30 different voices, genuinely natural delivery, and nothing to download, because all the heavy lifting happens on Google's side.

    This is the single-speaker node. If you want an interview or a podcast where two voices trade lines, grab its sibling, the Multi-Speaker TTS node, instead. This one is for narration, voiceover, and anything with one consistent voice.

    How it works

    It uses the google-genai SDK to call generate_content with audio as the response modality, passing a prebuilt voice name and, optionally, an instruction_prefix that gets glued onto the front of your text. So "Read slowly and clearly: …" becomes a literal instruction the model follows. The returned audio is decoded from WAV into a {"waveform": tensor, "sample_rate": 24000} dict - the standard ComfyUI audio format - so it drops straight into PreviewAudio or any audio node that speaks ComfyUI's AUDIO type.

    One gotcha hiding in the defaults: instruction_prefix ships as "Say cheerfully:". If you forget it's there, everything sounds like it's hosting a kids' show. It's the author's choice of a demo default, not a mandate - set it to empty for plain reading.

    The inputs that matter

    • text - multiline, what gets spoken.
    • api_key - your Google AI Studio key, from aistudio.google.com.
    • model - gemini-2.5-flash-preview-tts (default) or gemini-2.5-pro-preview-tts. Flash is faster and cheaper; Pro is worth it when you care about the delivery.
    • voice - the big one. 30 choices, each labeled with a style: Kore (Firm), Puck (Upbeat), Zephyr (Bright), Charon (Informative), and so on. The parenthetical is descriptive, not prescriptive.

    Output is audio (AUDIO), which wires into PreviewAudio or any ComfyUI audio output/save node.

    Installing it

    Same install as 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
    

    That's the whole dependency story: google-genai>=1.66.0, and no model files. Restart ComfyUI and you'll find the node under the "Google AI Studio" menu.

    Where people get burned

    The usual suspects: an empty or wrong api_key throws "API key is required," and hitting Google's rate limits just fails the run. If you're generating long narration, keep each call under the ~32k token context window - the node doesn't chunk for you. And the 24kHz, 16-bit PCM output is fine for narration but isn't studio-grade; don't expect to drop it straight into a master without some processing. It's the fast, good-enough option, which is exactly what most ComfyUI video work needs.

    CategoryGoogle AI Studio

    Inputs (5)

    NameTypeDefaultDescription
    textSTRINGHello! This is a test of Google AI Studio text-to-speech.
    api_keySTRINGYour Google AI Studio API key
    modelCOMBOgemini-2.5-flash-preview-tts2 options: gemini-2.5-flash-preview-tts, gemini-2.5-pro-preview-tts
    voiceCOMBOKore (Firm)30 options: Zephyr (Bright), Puck (Upbeat), Charon (Informative), Kore (Firm), Fenrir (Excitable), Leda (Youthful), +24
    instruction_prefixoptSTRINGSay cheerfully:Optional instruction prefix for style control

    Outputs (1)

    NameTypeDescription
    audioAUDIO