VoxCPM SRT Auto-Dubber (Line-by-Line Ref)
Translate the subtitles, and it teaches itself the voice line by line
- model
- original_audio
- AUDIO
This is the node that does the "dub this video into another language" party trick. Unlike the regular Dubber - which needs you to build a voiceprint cache for each speaker beforehand - the Auto-Dubber learns the voice from the source audio itself, one line at a time. You hand it the original recording plus two SRT files (the transcript and its translation), and it re-speaks the whole thing in the target language while keeping the original timing. The pack's third example workflow, SRT_VoxCPM_transfer.json, is built entirely around it.
How it works
For each line in the target SRT, it:
- Finds the matching line in the source SRT by index number, and cuts that segment out of the original audio as a reference clip.
- Builds a fresh voiceprint cache from that clip on the fly (the code comments call this the soul of the node - every line gets its own reference, so the voice tracks the original speaker closely, emotion and all).
- Generates the translated text with VoxCPM, time-stretches it to fit the target line's duration, and places it on a fresh timeline.
Because each line clones from its own source segment, you don't need any Cache Builder or Cache Combiner nodes at all. Inputs are model, original_audio, source_srt_text (the transcript), target_srt_text (the translation), plus the usual normalize_text, stretch_method, cfg_value, inference_timesteps, seed, retry_max_attempts/retry_threshold and keep_model_loaded. Output is a mono AUDIO at the original file's sample rate.
The gotcha nobody warns you about
The Auto-Dubber writes to a fully silent canvas - the output is only the new voice. No music, no ambience, no original background. The code comment is blunt about it: the node assumes you can't cleanly separate background from voice, so it gives you clean speech and lets you mix it back yourself in ComfyUI. If your source has background music, plan on an audio-mix step (and accepting that the parts you replaced lost their bed).
Line matching is by index: a target line numbered 7 looks for a source line numbered 7, and if it's missing, that line is silently skipped. Also note the per-line cache build means the model is invoked twice per line (once to clone, once to speak), so this node is noticeably slower than the Processor. It's the cost of not needing any upfront voiceprint work.
Installing it
One of eight nodes in judian17/ComfyUI-SRT-subtitles-VoxCPM:
cd ComfyUI/custom_nodes
git clone https://github.com/judian17/ComfyUI-SRT-subtitles-VoxCPM
Restart, or install via ComfyUI Manager (search "SRT subtitles VoxCPM"). The model auto-downloads to models/TTS on first run; the pack needs librosa (for the default stretch method and resampling), and pydub if you switch to its stretch mode, which also demands FFmpeg in PATH. It's not covered in the README's node list, but it ships in the code and the transfer workflow - a sign the author added it after the docs were written.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| model | VOXCPM_MODEL | — | |
| original_audio | AUDIO | — | |
| source_srt_text | STRING | Source Language SRT (Transcript)... | — |
| target_srt_text | STRING | Target Language SRT (Translation)... | — |
| normalize_text | BOOLEAN | true | — |
| stretch_method | COMBO | librosa | 3 options: none, librosa, pydub |
| keep_model_loaded | BOOLEAN | true | — |
| stretch_n_fft | INT | 320128–8192 | — |
| stretch_hop_length | INT | 88–2048 | — |
| cfg_value | FLOAT | 2.01–10 | — |
| inference_timesteps | INT | 301–100 | — |
| seed | INT | -1-1–9223372036854776000 | — |
| retry_max_attempts | INT | 30–10 | — |
| retry_threshold | FLOAT | 6.002–20 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| AUDIO | AUDIO | — |