Nodes/ComfyUI-JM-MiniMax-API/MiniMax Voice Cloning
ComfyUI Node

MiniMax Voice Cloning

Clone a Voice From a 30-Second Sample

By juemingai·Created about a year ago·Updated about a year ago· 6
MiniMax Voice Cloning
    • voice_id
    api_key
    group_id
    audio_file
    voice_idMiniMax001
    need_noise_reductionfalse
    need_volume_normalizationfalse
    preview_text
    modelspeech-02-hd
    accuracy0.7

    The MiniMax Voice Cloning node does what it says on the tin: you hand it an audio sample of a voice, and MiniMax builds a custom voice ID you can use in the Text to Speech node. It's the pack's answer to "I want TTS in this specific person's voice," and it's a genuinely useful piece of the pipeline - assuming you respect that you're cloning a real voice into a commercial API, so keep the consent conversation in mind.

    The workflow it anchors:

    Load AudioVoice CloningText to Speech (wire the voice_id into custom_voice_id)

    How it works

    Two HTTP calls, both against https://api.minimaxi.chat/v1. First it uploads your audio file as a multipart upload to /files/upload?GroupId=... (with purpose: voice_clone) and gets back a file_id. Then it POSTs to /voice_clone?GroupId=... with that file ID plus your voice ID and settings, and MiniMax registers the cloned voice under the ID you chose. If you filled in preview_text, the clone request also asks MiniMax to synthesize a preview clip with that text so you can hear the result immediately.

    Nothing is stored locally and no audio processing happens on your machine - the whole thing is a thin wrapper over MiniMax's cloud, like every node in this pack.

    The inputs that matter

    • api_key and group_id - both required, and the Group ID is the one people forget. Get both from your MiniMax console.
    • audio_file - the absolute path to a .mp3, .wav, or .m4a. Wire it from the Load Audio node; that's the clean way. The node checks the file exists before it starts.
    • voice_id - here's the trap: it must be at least 8 characters, start with a letter, and include a number. The node validates this and refuses anything that doesn't fit. The default MiniMax001 works, and whatever you pick is what you'll use in Text to Speech later.
    • need_noise_reduction and need_volume_normalization - two boolean quality options. Turn on noise reduction if your sample was recorded on a phone; normalize the volume if the level is all over the place.
    • accuracy - a 0.0–1.0 threshold (default 0.7) for how closely the clone must match. Higher is stricter.
    • preview_text - optional, max 300 characters. Include it to get an immediate sense of how the clone sounds; leave it empty to skip the preview step.
    • model - the TTS model used for that preview (speech-02-hd by default). Only matters if you set preview_text.

    Output

    One string: voice_id - the ID you chose, confirmed. Wire it into Text to Speech's custom_voice_id input and it'll speak in that voice.

    Common issues

    The voice ID format validation trips up more people than anything else. The failures are the classic ones: an ID that's too short, one that starts with a digit, or one with no number in it at all. The error message spells out all three rules, so read it before you start guessing.

    Beyond that, the usual pack fare: missing group_id raises immediately, and a bad key or empty balance surfaces as a readable API error. If the API flags your input audio as sensitive, the node logs a warning - that's MiniMax's content check, not a technical failure.

    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. Dependencies are just requests and Pillow; the heavy lifting happens on MiniMax's servers, and cloning is a paid cloud call, so expect it to cost a little API credit.

    CategoryJM-MiniMax-API/Speech

    Inputs (9)

    NameTypeDefaultDescription
    api_keySTRING
    group_idSTRING
    audio_fileSTRING
    voice_idSTRINGMiniMax001
    need_noise_reductionBOOLEANfalse
    need_volume_normalizationBOOLEANfalse
    preview_textSTRING
    modelCOMBOspeech-02-hd4 options: speech-02-hd, speech-02-turbo, speech-01-hd, speech-01-turbo
    accuracyFLOAT0.70–1

    Outputs (1)

    NameTypeDescription
    voice_idSTRING