Nodes/APZmedia Qwen TTS Nodes/APZmedia: Segmented Generate
ComfyUI Node

APZmedia: Segmented Generate

One script, many voices, a single WAV

By APZmedia·Created 5 months ago·Updated 5 months ago· 1
APZmedia: Segmented Generate
  • model
  • audio
  • segment_count
script[voice: cheerful and bright] Hello there! [/voice] [voice: quiet and tense] Something is wrong.
languageEnglish
default_instructNeutral, clear narration.
seed0

The pack's party trick: APZmedia: Segmented Generate takes a whole script where each block gets its own voice direction, and spits out one concatenated audio file. You write [voice: ...] tags inline, the node parses them, generates each segment sequentially with a different instruct, and stitches the results together. Two characters arguing in one run, no intermediate files, no manual concatenation.

The markup is dead simple:

[voice: warm and welcoming] Good morning, and welcome to the show. [/voice]
[voice: tense and hushed] What I'm about to tell you must not leave this room. [/voice]
[voice: cheerful and upbeat] But first - today's sponsor! [/voice]

Anything outside the tags uses default_instruct ("Neutral, clear narration" by default), so you can drop plain text into a script and it'll just be narrated. The parser is a real state machine - it walks the string, doesn't regex-hack your script - and it'll raise a clear error if you leave a [voice: unclosed or forget the matching [/voice]. Worth knowing before you hand it a 400-line script with a missing tag at line 389: you'll get an error pointing at the character position, which is genuinely helpful but still means a fix-and-rerun.

Inputs

  • model - must be a VoiceDesign model (...-1.7B-VoiceDesign). Validated, like everything else in the pack.
  • script - the full script with markup. This is the whole game; there's no per-segment node wiring, it's all in this one multiline field.
  • default_instruct - voice direction for untagged text.
  • language - one language for every segment; there's no per-segment language. English default, ten more, or Auto.
  • seed - reproducibility across the whole run.

Outputs

  • audio - the concatenated result, standard ComfyUI AUDIO at 24000 Hz. Preview it or feed Audio Saver.
  • segment_count - how many segments were actually generated. Mostly useful for sanity-checking a long script, or as a wire you can use to drive something downstream.

Each segment is generated sequentially with its own instruct, then concatenated. That's why the workflow is predictable and why it's slower than you might hope on a long script - it's one model call per segment, not one call for the whole thing. Plan accordingly for multi-paragraph scripts.

Where it fits

This is the node for character dialogue, narration with emphasis shifts, or anything where the voice should change within a take. If your script needs the same voice the whole way through with no variation, Voice Design Generate is lighter. But the moment you need a two-voice conversation, this is the one - and it's the pack's own example of the voice-design model at its best, because the instruct-style control is exactly what Qwen3-TTS is good at.

Gotcha for the expressiveness skeptics: if your segments come out flat, remember that each [voice: ...] description is doing the work. "gruff old man" beats "male voice" every time. The model performs as directed; it's on you to direct.

CategoryAPZmedia/TTS

Inputs (5)

NameTypeDefaultDescription
modelQWEN_TTS_MODEL
scriptSTRING[voice: cheerful and bright] Hello there! [/voice] [voice: quiet and tense] Something is wrong.
languageCOMBOEnglish11 options: English, Chinese, Japanese, Korean, German, French, +5
default_instructSTRINGNeutral, clear narration.
seedINT00–2147483647

Outputs (2)

NameTypeDescription
audioAUDIO
segment_countINT