Nodes/ComfyUI-CSM-Nodes/Load Audio with Transcription
ComfyUI Node

Load Audio with Transcription

The feeder node that makes CSM voice cloning work

By thezveroboy·Created about a year ago·Updated 8 months ago· 35
Load Audio with Transcription
    • audio
    • transcription
    • speaker
    audio_file
    transcription
    speaker0

    Load Audio with Transcription is the unglamorous workhorse in front of CSM Text-to-Speech with Context. It loads a reference voice clip from disk and hands it to the TTS node together with the clip's words - and that's basically all it does. If voice cloning is your goal, this is where every good workflow starts.

    One honest warning before you get excited: the name slightly lies. This node does not transcribe anything. "With Transcription" means it carries a transcription you type in, alongside the audio. You write the words; the node just passes them through. There's no Whisper or speech-to-text hiding in here.

    What it does

    Mechanically it's simple. It picks a file from ComfyUI/models/audio/, loads it with torchaudio, resamples to 24 kHz if needed, downmixes stereo to mono, and normalizes it into the AUDIO shape ComfyUI expects. Then it returns three things:

    • audio - the clip, ready for the context input of the TTS node.
    • transcription - the exact string you typed, forwarded unchanged.
    • speaker - the speaker id you picked, forwarded unchanged.

    Why bother with three separate outputs? Because CSM's context node needs the audio, the words, and a speaker slot as three separate wires, and this node bundles them so you can't forget one. If the transcription is missing or mismatched, you find out in the TTS node.

    The inputs that matter

    • audio_file - a dropdown of whatever's in ComfyUI/models/audio/. Put your clip there (wav, mp3, flac all work).
    • transcription - type the clip's words exactly as spoken. This is the field that decides whether your clone sounds right or garbled.
    • speaker - 0–10, the voice slot the clip occupies. Keep it consistent with the context_speaker you feed the TTS node.

    Installation and setup

    It ships in thezveroboy/ComfyUI-CSM-Nodes - same pack as the TTS nodes. Install via ComfyUI Manager (search "ComfyUI-CSM-Nodes") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/thezveroboy/ComfyUI-CSM-Nodes
    pip install -r ComfyUI-CSM-Nodes/requirements.txt
    

    Then restart. The one extra step this node needs: ComfyUI/models/audio/ doesn't exist out of the box, so create it and drop your clip in.

    Common issues

    • "No audio files found" in the dropdown. The folder is empty or missing. Create ComfyUI/models/audio/, add the file, and reload the workflow - the dropdown is populated when the node is built, so it won't always refresh live.
    • Garbled clones. 99% of the time it's the transcription not matching the clip, not the audio. Check the words.
    • Stereo or odd-format clips. The node handles these (downmix + resample), but only if it can load them via torchaudio. Extremely unusual codecs will error - convert to wav/mp3 first.
    Categoryzveroboy/CSM

    Inputs (3)

    NameTypeDefaultDescription
    audio_fileCOMBO1 options: No audio files found
    transcriptionSTRING
    speakerINT00–10

    Outputs (3)

    NameTypeDescription
    audioAUDIO
    transcriptionSTRING
    speakerINT