Nodes/ComfyUI-JM-MiniMax-API/MiniMax Text to Speech
ComfyUI Node

MiniMax Text to Speech

ElevenLabs-Class TTS, Living Inside ComfyUI

By juemingai·Created about a year ago·Updated about a year ago· 6
MiniMax Text to Speech
    • audio_path
    • subtitle_path
    • audio_url
    api_key
    group_id
    text
    modelspeech-2.5-hd-preview
    voice_id
    speed1.0
    volume1.0
    pitch0
    emotion
    subtitle_enablefalse
    filename_prefixtts_output
    seed0
    custom_voice_id
    language_boostauto
    output_formathex

    The MiniMax Text to Speech node is the reason most people install this pack. It turns up to 5,000 characters of text into natural-sounding, MP3 speech using MiniMax's commercial TTS models - the same voices that show up as the benchmark next to ElevenLabs and GPT-4o-audio in every voice-model comparison thread. The quality is genuinely good, the emotion and speed controls work, and you get it as a node in your graph instead of a web app you have to tab away to.

    How it works

    The node POSTs to https://api.minimaxi.chat/v1/t2a_v2?GroupId=... with your text, a voice_setting block (voice, speed, volume, pitch, optional emotion), and an audio_setting (32kHz, 128kbps MP3, mono - fixed). The response comes back as hex-encoded audio (default output_format: hex) or a URL, and the node writes a timestamped .mp3 to your ComfyUI output folder. If subtitle_enable is on, it also fetches a JSON subtitle file with sentence-level timestamps.

    One honest quirk: the seed input exists and does... not what a diffusion user expects. The node explicitly does not send it to the API - it's only used for ComfyUI's execution/caching control, and it generates a random value internally when you leave it at 0. Don't expect a fixed seed to give you bit-identical audio. This is a cloud API, not a local sampler.

    The inputs that matter

    The two that get people stuck:

    • api_key and group_id - both required. TTS (and Voice Cloning) need the Group ID from your MiniMax console, not just the key. Get both from MiniMax's open platform, and expect a "Group ID must be provided" error if you skip the second one.

    The ones you'll actually fiddle with:

    • text - what to say, up to 5,000 characters.
    • model - speech-2.5-hd-preview (default), speech-02-hd/speech-02-turbo, or the older speech-01-hd/speech-01-turbo. The .hd models sound better; the -turbo ones are faster and cheaper. Start with the default.
    • voice_id - a predefined voice from MiniMax's library. If you leave it empty, the node uses whatever falls out of the custom_voice_id path below - so don't.
    • custom_voice_id - this is the one you wire from the Voice Cloning or Voice Design node. If set, it overrides voice_id.
    • speed (0.5–2.0), volume (0.1–10.0), pitch (−12 to +12) - the standard mix desk. Pitch in semitones, roughly.
    • emotion - happy, sad, angry, fearful, disgusted, surprised, or neutral. Only applied if you pick one; empty means the model's default delivery.
    • language_boost - auto by default, or pick the language if the model is mangling accents.

    The nice-to-haves: subtitle_enable for a timestamped JSON, filename_prefix for tidy outputs, and output_format (hex default, or url for a 24-hour hosted link).

    Outputs

    Three strings: audio_path (the saved MP3 - wire it into Preview Audio), subtitle_path (the JSON, if enabled), and audio_url (only populated in url mode).

    Common issues

    Missing group_id is the top failure. Past that, the API errors are raised as readable messages (auth, balance, rate limit). And remember this is a paid cloud call - every generation burns a little API credit, so preview with short text before you render 5,000 characters.

    Install

    Part of the ComfyUI-JM-MiniMax-API pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/synthetai/ComfyUI-JM-MiniMax-API
    pip install -r requirements.txt
    

    Or search "ComfyUI-JM-MiniMax-API" in ComfyUI Manager and restart. Just requests and Pillow - no GPU, no local models. The whole pack is a thin wrapper over MiniMax's cloud, which is exactly why it installs in ten seconds.

    CategoryJM-MiniMax-API/Speech

    Inputs (15)

    NameTypeDefaultDescription
    api_keySTRING
    group_idSTRING
    textSTRING
    modelCOMBOspeech-2.5-hd-preview5 options: speech-2.5-hd-preview, speech-02-hd, speech-02-turbo, speech-01-hd, speech-01-turbo
    voice_idSTRING
    speedFLOAT1.00.5–2
    volumeFLOAT1.00.1–10
    pitchINT0-12–12
    emotionCOMBO8 options: , happy, sad, angry, fearful, disgusted, +2
    subtitle_enableBOOLEANfalse
    filename_prefixSTRINGtts_output
    seedINT00–18446744073709550000
    custom_voice_idoptSTRING
    language_boostoptCOMBOauto25 options: auto, Chinese, Chinese,Yue, English, Arabic, Russian, +19
    output_formatoptCOMBOhexhex: 返回十六进制编码的音频数据; url: 返回音频下载链接(有效期24小时)

    Outputs (3)

    NameTypeDescription
    audio_pathSTRING
    subtitle_pathSTRING
    audio_urlSTRING