Nodes/ComfyUI_AIIA/✂️ AIIA Podcast Splitter
ComfyUI Node

✂️ AIIA Podcast Splitter

Split a Dialogue by Speaker So Each Role Gets Its Own TTS Engine

By havvk·Created about a year ago·Updated 6 months ago· 13
✂️ AIIA Podcast Splitter
    • speaker_A_text
    • speaker_B_text
    • split_map
    dialogue_json

    The easy way to make a podcast is one TTS node reading the whole script - but then every character shares the same voice. The serious way is to generate each speaker's lines with a different voice (or even a different TTS engine), then stitch them back together. ✂️ AIIA Podcast Splitter is the middle of that pipeline: it takes the parsed dialogue JSON and tears it into per-speaker text streams, while keeping a map of the original order so the stitcher can reassemble everything.

    How it works

    Feed it dialogue_json from AIIA Podcast Script Parser. It walks the script, groups every speech line by speaker, and produces three outputs:

    • speaker_A_text - all of the first speaker's lines, one per line.
    • speaker_B_text - the second speaker's lines. If there are more than two speakers it logs a warning and uses only the first two (sorted by name, so the A/B assignment is stable regardless of script order).
    • split_map - the crucial JSON map that records which line came from whom, in what order. This is what AIIA Podcast Stitcher consumes to interleave the separate audio tracks back into the original conversation.

    Pauses and emotion tags survive the split, so per-speaker TTS gets the same [Happy]/(Pause) cues the whole script had. And because it's just text in, text out, you can route each speaker to a completely different engine - Speaker A through the pack's VibeVoice for a natural long-form voice, Speaker B through IndexTTS-2 for emotion control, whatever fits the character.

    Why this pattern instead of the all-in-one dialogue node

    The pack also has single-node dialogue TTS (like the Qwen3-TTS Dialogue Specialist) that handles multiple speakers internally. Splitter + Stitcher is the advanced path, and it wins when you want:

    • Different TTS engines per character.
    • Independent parameter tuning per voice (speed, emotion, CFG).
    • Per-speaker post-processing (each track cleaned or enhanced separately).

    It's more nodes and more setup. If one engine already handles all your voices well, skip this pair.

    The input that matters

    Just dialogue_json - one connection. Everything else is outputs. The splitter sorts speakers by name for deterministic A/B assignment; if you want to know which name landed on which letter, check the console log (it prints the assignment) or look at the split_map.

    One quirk to know: the parser's speaker_mapping is what controls role names. If your script uses Teacher and Student and you didn't map them to A/B, the splitter still works - it sorts whatever names exist. But mapping them keeps the downstream TTS preset wiring predictable.

    Install

    Standard pack install: havvk/ComfyUI_AIIA via ComfyUI Manager or git clone https://github.com/havvk/ComfyUI_AIIA.git into custom_nodes/, restart. No models, no deps - pure JSON/text handling.

    CategoryAIIA/Podcast

    Inputs (1)

    NameTypeDefaultDescription
    dialogue_jsonSTRING

    Outputs (3)

    NameTypeDescription
    speaker_A_textSTRING
    speaker_B_textSTRING
    split_mapSTRING