Nodes/ComfyUI-VoxCPM2/VoxCPM2 Dataset Maker
ComfyUI Node

VoxCPM2 Dataset Maker

Your Folder of Clips, Turned Into a Training Manifest

By Saganaki22·Created 5 months ago·Updated 4 months ago· 195
VoxCPM2 Dataset Maker
    • Dataset Path
    audio_directory
    output_filenametrain.jsonl

    If you're training a VoxCPM LoRA in ComfyUI, this is the boring node at the start of the chain - and boring is good, because it's the one that keeps you from hand-writing JSON. VoxCPM2 Dataset Maker scans a folder of audio clips plus their transcripts and writes a train.jsonl manifest that the pack's trainer can actually consume.

    How it works

    Point it at a directory and it globs every *.wav file, looks for a matching *.txt with the same base name, and writes one JSON line per pair into the output file inside that same directory. That's it. It's deliberately strict about the pairing:

    my_dataset/
    ├── voice_001.wav
    ├── voice_001.txt      <- must share the base name
    └── voice_002.wav
        voice_002.txt
    

    Only .wav counts - .flac, .mp3, .ogg are silently ignored. If a wav has no transcript, or the transcript is empty, that sample is skipped. If nothing survives, it raises an error telling you exactly why. The two inputs are just audio_directory (absolute path to the folder) and output_filename (defaults to train.jsonl), and it hands back a Dataset Path string output you wire straight into the LoRA Trainer node.

    Make the data worth feeding

    Dataset curation beats every knob in training, and this pack is no exception. Follow the README's guide on clip quality:

    • 3–10 seconds per clip, and avoid anything past 15 seconds - long clips blow up VRAM during training.
    • Clean speech, no background noise. The model learns the room noise as much as the voice.
    • Accurate verbatim transcripts. This is a TTS model; the transcript is what it learns to say, so garbage in, garbage out.
    • Any of the 30 supported languages works. Audio gets resampled to 16kHz for the encoder automatically, so don't stress the source rate.

    Install and notes

    It's part of the ComfyUI-VoxCPM2 pack (install via ComfyUI Manager, or git clone https://github.com/Saganaki22/ComfyUI-VoxCPM2.git into custom_nodes). This specific node has no extra dependencies, but the training chain as a whole needs argbind and datasets, which aren't in the base requirements.txt - the Trainer node will tell you to install them the first time you try to run it. Since a good dataset is a few hours of curation anyway, install those early:

    pip install argbind datasets
    

    One workflow tip: keep your dataset folder somewhere you can find again, because the JSONL lives inside it, and the Trainer wants the absolute path to that file. Lose the path and the node errors on a missing file - not a mystery, just annoying.

    Categoryaudio/tts/training

    Inputs (2)

    NameTypeDefaultDescription
    audio_directorySTRINGPath to directory containing .wav and .txt files.
    output_filenameSTRINGtrain.jsonlName of the output JSONL file.

    Outputs (1)

    NameTypeDescription
    Dataset PathSTRING