Nodes/SpicyAPI/Grok TTS · Text to Speech
ComfyUI Node

Grok TTS · Text to Speech

71 Voices, and One Setting That Will Ruin Your Audio

By spicyapi-ai·Created 21 days ago·Updated 2 days ago· 2
Grok TTS · Text to Speech
    • audio
    • task id
    ◄text►
    ◄voice_idEve · female · multilingual (default)►
    ◄languageAuto-detect►
    ◄speed1.00►
    ◄output_formatMP3►
    ◄sample_rate24 kHz►
    ◄bitrate128 kbps►
    ◄text_normalizationfalse►
    ◄optimize_streaming_latency0 — best quality►
    ◄seed0►

    xAI's text-to-speech, wired into your graph. Script in, AUDIO out, $0.018 per 1,000 characters - so the full 15,000-character limit tops out around 27 cents a run. Seventy-one preset voices, twenty languages, a speed dial, and speech tags that actually get acted out rather than read aloud.

    The KB's framing of this corner is that TTS is one of two audio jobs where the hosted model is genuinely hard to beat locally: voice work, alongside song generation. If you're doing narration or character dialogue at volume, this is the node that stops you from babysitting an open model's pronunciation.

    How it works

    text goes up, an audio file comes back, the pack decodes it with PyAV and hands you a normal ComfyUI AUDIO value. Wire Save Audio to it and you're done. The task id output is the second socket - a string for the console or a support request, not something you need to use.

    Speech tags are the interesting part. [laugh], or <whisper>…</whisper> around a line, are performed rather than spoken. They also count toward the character bill, tags included, so a script stuffed with stage directions costs marginally more than the plain words.

    Outputs: audio and task id. Like the rest of this pack, nothing saves itself.

    The inputs that matter

    • voice_id - 71 presets, defaulting to Eve · female · multilingual (default). Eve, Ara, Leo, Rex and Sal speak every supported language; the rest are tuned for one language and sound wrong outside it. This is the field to spend ten minutes on before you spend an hour on a script.
    • text - up to 15,000 characters, tags included.
    • language - Auto-detect by default, or one of twenty, including regional splits like es-MX/es-ES, pt-BR/pt-PT and ar-EG/ar-SA/ar-AE. Auto is fine for English; for anything else, set it, because a wrong guess is audible in the first word.
    • speed - 0.7 to 1.5, in steps of 0.05. Subtle, and genuinely useful for matching a narration to a video's length without rewriting the script.
    • text_normalization - rewrites numbers, abbreviations and symbols as spoken words before reading. Turn it on if your script has prices, dates or units in it.
    • sample_rate and bitrate - 24 kHz and 128 kbps by default. Bitrate only applies to MP3.
    • optimize_streaming_latency - levels 0 to 2, trading quality at chunk boundaries for a smaller first chunk. In a batch node you receive the whole file, so 0 is right unless you have a specific reason.

    The setting that will bite you: output_format. Options are mp3, wav, pcm, mulaw and alaw. The last three are raw streams with no file header, meant for phone systems - and this pack decodes results with PyAV, which needs an actual container to open. Staying on mp3 or wav keeps everything ordinary; reaching for mulaw because it sounds efficient is how you end up with a decode failure or a nonsense waveform. Same reasoning applies to the 8 kHz phone-line sample rate: only pick it if you actually want a telephone.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/spicyapi-ai/comfyui-spicyapi
    

    Restart ComfyUI, then Settings > SpicyAPI and paste a key from spicyapi.ai/console/keys. Restart once more - the node list is built from your account at startup. Servers can set SPICY_API_KEY in the environment instead.

    Nothing is downloaded and nothing is pip-installed: dependencies = [], and the pack runs on aiohttp, torch, Pillow and PyAV, all already inside ComfyUI. No model weights, no Python 3.10+ drama beyond ComfyUI's own minimum, V3 node API (tested against 0.39). ComfyUI Manager installs it by pack title.

    Where people get burned

    Billing first, since it's per character: the badge shows the rate, Settings > SpicyAPI > Max cost per run refuses anything quoted above your ceiling before a cent moves, and seeds ship fixed so double-queueing reuses the cached result rather than charging twice. Cancelling ends your wait, not the job - it finishes on SpicyAPI and is billed if it succeeds, with the result in your console for up to 14 days.

    Then the usual suspects: No SpicyAPI key is set, 40310 (unverified email), 40004 (no deployment serves that option combination - the message names the field, and here it's usually a voice/language mismatch), and anything ending in request_id ..., which belongs in a support message.

    One workflow idea worth the pixels: chain a Chat node into this one and let a text model write the script, then wire Grok STT's text output onto the result if you want to read back what was actually said. Round-tripping your own audio through transcription catches the mispronounced names before your audience does.

    CategorySpicyAPI/Audio/xAI

    Inputs (10)

    NameTypeDefaultDescription
    textSTRINGThe words to be spoken, with optional speech tags such as [laugh] or <whisper>…</whisper>. Billed per 1,000 characters, tags included.
    voice_idCOMBOEve · female · multilingual (default)Preset voice. Eve, Ara, Leo, Rex and Sal speak every supported language; the others are tuned for one language.
    languageCOMBOAuto-detectReading language, or auto to detect it from the text.
    speedFLOAT1.000.7–1.5Speaking speed from 0.7 (slower) to 1.5 (faster).
    output_formatCOMBOMP3Audio encoding. pcm, mulaw and alaw are raw streams without a file header, for phone systems.
    sample_rateCOMBO24 kHzSample rate in Hz. 8000 for phone lines, 44100 or 48000 for studio work.
    bitrateCOMBO128 kbpsMP3 bit rate in bits per second. Only applies to mp3.
    text_normalizationBOOLEANfalseRewrite numbers, abbreviations and symbols as spoken words before reading.
    optimize_streaming_latencyCOMBO0 — best qualityStreaming latency level: 0 best quality, 1 smaller first chunk, 2 smallest first chunk with more quality trade-off at chunk boundaries.
    seedINT00–2147483647This model takes no seed, so the number is never sent. Changing it makes ComfyUI run the node again: set 'control after generate' to randomize for a new result on every run; every run is billed.

    Outputs (2)

    NameTypeDescription
    audioAUDIOSeveral results come back as a batch; Save Audio writes one file each.
    task idSTRINGThe SpicyAPI task id, for the console logs or support.