Nodes/ComfyUI-SRT-subtitles-VoxCPM/VoxCPM Cache Combiner (Chainable)
ComfyUI Node

VoxCPM Cache Combiner (Chainable)

Chain speakers together and turn a monologue into a conversation

By judian17·Created 10 months ago·Updated 10 months ago· 7
VoxCPM Cache Combiner (Chainable)
  • cache_item
  • cache_group
  • CACHE_GROUP

Each Cache Builder produces one speaker's voiceprint. The Cache Combiner is the unglamorous node that collects several of them into a single CACHE_GROUP, so the SRT Processor and SRT Dubber can switch between characters as they read through your subtitle file. You can't make a two-person dialogue without it - the Processor looks up a speaker's voice per line, and this is where the lookup table gets built.

It's deliberately chainable. You connect one cache per combiner and daisy-chain the combiners:

  • The first Combiner leaves its cache_group input unconnected. There's nothing to build on yet.
  • Every subsequent Combiner gets cache_item from a Cache Builder and cache_group from the previous Combiner's output.
  • The last Combiner's CACHE_GROUP output goes into the SRT Processor's (or Dubber's) cache_group port.

Internally it's just a dictionary keyed by speaker name, which is why names matter so much. If you accidentally reuse a speaker name across two Cache Builders, the second one silently overwrites the first (it logs a warning, that's all). And because the key is the speaker name you set in the Cache Builder, whatever you type there has to line up with the speaker1 prefixes in your SRT text - a mismatch means lines get skipped at generation time with a warning, not an error.

Two inputs, one output, no knobs to tune. The only decision you make is wiring order. If you're doing a single-speaker video you can skip this node entirely and feed the cache straight to the Processor, which will notice there's exactly one speaker and switch to single-speaker mode - but for anything with two or more characters, you want a chain of these.

Installing it

Part of the ComfyUI-SRT-subtitles-VoxCPM pack, so install the pack:

cd ComfyUI/custom_nodes
git clone https://github.com/judian17/ComfyUI-SRT-subtitles-VoxCPM

Restart ComfyUI afterward, or install via ComfyUI Manager by searching "SRT subtitles VoxCPM". The combiner itself is pure Python - no dependencies of its own - but the pack as a whole pulls in librosa, pydub and the VoxCPM model, so expect the first real run to download the model into ComfyUI/models/TTS. There's a bundled example workflow (SRT_VoxCPM.json) that shows three Cache Builders feeding a chain of combiners into the Processor; it's worth loading once to see the wiring pattern in the flesh.

Categoryaudio/tts

Inputs (2)

NameTypeDefaultDescription
cache_itemVOXCPM_CACHE
cache_groupoptCACHE_GROUP

Outputs (1)

NameTypeDescription
CACHE_GROUPCACHE_GROUP