VoxCPM Cache Builder
Five seconds of someone talking, and VoxCPM remembers who they are
- model
- prompt_audio
- VOXCPM_CACHE
The whole pack runs on this trick: VoxCPM is a zero-shot voice cloning TTS, which means it doesn't need fine-tuning to sound like someone - it just needs a short reference clip and its transcript. The Cache Builder is where you hand those over. Give it a few seconds of audio, type what's being said, and it produces a "voiceprint" the SRT nodes will use for every line that speaker gets.
Community reaction to VoxCPM has been quietly enthusiastic - people who've compared it to the hyped options (Chatterbox, Kokoro, VibeVoice) keep coming back to it because it's fast, accurate, and skips fewer words on long text. The accent of your reference carries over into the cloned voice, for better or worse, which is exactly why this node matters: your reference clip is the voice.
The three inputs that matter
model- the VOXCPM_MODEL from a VoxCPM Loader. Not optional; if you leave it unconnected you'll get "Model not loaded."speaker_name- a plain string, defaultspeaker1. This is the name you'll use as the prefix in the SRT file (e.g.speaker1 Hello world!), and it must match exactly - the SRT processor looks up caches by this key and silently skips lines whose speaker it can't find.prompt_audio- the reference clip. Use ComfyUI's coreLoad Audio, or the pack's Audio Trimmer to pull a specific segment out of a longer file.prompt_text- the transcript of that clip. The node actually raises an error if you leave the placeholder text in, because the transcript is how VoxCPM aligns the audio to text. It needs to match what's said; a mismatch means a muddier clone.
One output: VOXCPM_CACHE, which you'll feed into a Cache Combiner, or straight into the SRT Processor's cache_group if you only have one speaker.
How it works under the hood
The node writes your waveform out to a temporary WAV file, calls VoxCPM's build_prompt_cache to create the speaker embedding, and then - worth knowing - offloads the model back to CPU and clears VRAM cache when it's done. So cache building is a two-stage affair: model loads, does its thing, leaves. If you build several caches in sequence and notice it feels slow, that offload is why; it's a deliberate trade to keep a 0.5B TTS from hogging your VRAM between runs.
Installing it
This is one of eight nodes in the judian17/ComfyUI-SRT-subtitles-VoxCPM pack:
cd ComfyUI/custom_nodes
git clone https://github.com/judian17/ComfyUI-SRT-subtitles-VoxCPM
Then restart ComfyUI. First run downloads openbmb/VoxCPM-0.5B into ComfyUI/models/TTS (a couple of GB, needs Hugging Face reachable). Keep optimize on the VoxCPM Loader set to none - torch.compile is notoriously broken on Windows, and the author keeps it around in case the community fixes it. The reference audio should be clean and single-speaker; five to ten seconds is the sweet spot.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| model | VOXCPM_MODEL | — | |
| speaker_name | STRING | speaker1 | — |
| prompt_audio | AUDIO | — | |
| prompt_text | STRING | Enter prompt transcript... | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| VOXCPM_CACHE | VOXCPM_CACHE | — |