Nodes/ComfyUI-VertexAPI/Gemini TTS (Vertex AI)
ComfyUI Node

Gemini TTS (Vertex AI)

Voices with a director's note

By Aryan185·Created 9 months ago·Updated about a month ago· 4
Gemini TTS (Vertex AI)
    • audio
    text
    project_id
    locationus-central1
    service_account
    model
    voice_id
    seed69
    temperature1.00
    styleNone
    paceNone
    accentNone
    audio_profile
    scene

    Thirty named voices, plus style, pace, and accent controls - this is the text-to-speech node that refuses to sound like a satnav. Gemini TTS turns a block of text into a 24 kHz AUDIO clip, and the fun part is how much direction it lets you give the performance. It's the natural companion to the Veo video node in this pack: generate a clip, then voice it over without ever leaving ComfyUI.

    What it is

    An audio/generation node that calls Gemini's preview TTS models over Vertex AI. Pick a voice from thirty (they're named after moons and stars - Zephyr, Puck, Charon, Kore...), pick a style like "Newscaster" or "Whisper", set a pace and an accent, and optionally write an audio_profile or scene description. The result is speech with actual direction, not a flat read.

    How it works

    The text goes to Gemini's generate_content with a speech_config carrying your voice choice, and the response comes back as audio bytes that the node converts into an AUDIO tensor (waveform + 24000 Hz sample rate). The clever bit is the director's note: if you set any style, pace, accent, profile, or scene, the node wraps your transcript in a structured prompt - "Read the following transcript based on the audio profile and director's note" - that tells the model how to perform. No extras and it just sends ## Transcript: with the text.

    The inputs that matter

    The credential trio once more: project_id, location, service_account. Same pack-wide rule: paste the contents of your JSON key, not a path.

    • text - the script. Can't be empty; the node raises an error rather than guess.
    • voice_id - the biggest quality lever. There are 30; audition a few, they differ a lot.
    • model - three preview options (gemini-2.5-flash-preview-tts, gemini-2.5-pro-preview-tts, gemini-3.1-flash-tts-preview). Preview names mean Google can move them; if a dropdown option 404s, it's been renamed upstream.
    • style / pace / accent - optional performance direction. "Deadpan" exists and it's wonderful.
    • audio_profile / scene - free-text fields for finer direction. This is where you'd describe the recording environment or the character's vibe.
    • temperature (default 1.0) - variation dial. Lower it if you want the same line to sound the same on reruns.

    Outputs

    audio - a single AUDIO output. Preview it, save it, or feed it into this pack's diarisation node or any audio pipeline. It's 24 kHz mono, which is fine for narration and dialogue.

    Installing

    cd ComfyUI/custom_nodes/
    git clone https://github.com/Aryan185/ComfyUI-VertexAPI.git
    cd ComfyUI-VertexAPI
    pip install -r requirements.txt
    

    Restart ComfyUI, or install ComfyUI-VertexAPI via ComfyUI Manager.

    Where people get burned

    Preview TTS models are exactly that - previews. They can be throttled or renamed by Google with little warning, and a "model not found" error usually means the name changed. Longer scripts cost more tokens and can hit output limits; keep takes to a paragraph or two. And because the audio is generated per call, iterating on a voice means paying for every take - audition with a short line, then lock the voice before generating the full script.

    Categoryaudio/generation

    Inputs (13)

    NameTypeDefaultDescription
    textSTRING
    project_idSTRING
    locationCOMBOus-central140 options: global, us-central1, us-east1, us-east4, us-east5, us-south1, +34
    service_accountSTRING
    modelCOMBO3 options: gemini-2.5-flash-preview-tts, gemini-2.5-pro-preview-tts, gemini-3.1-flash-tts-preview
    voice_idCOMBO30 options: Zephyr, Puck, Charon, Kore, Fenrir, Leda, +24
    seedINT69-1–2147483646
    temperatureFLOAT1.000–2
    styleoptCOMBONone7 options: None, Vocal Smile, Newscaster, Whisper, Empathetic, Promo/Hype, +1
    paceoptCOMBONone5 options: None, Natural, Rapid Fire, The Drift, Staccato
    accentoptCOMBONone8 options: None, Neutral, American (Gen), American (Valley), American (South), British (RP), +2
    audio_profileoptSTRING
    sceneoptSTRING

    Outputs (1)

    NameTypeDescription
    audioAUDIO