Nodes/TTS Audio Suite/๐ŸŒˆ IndexTTS-2 Text Emotion
ComfyUI Node

๐ŸŒˆ IndexTTS-2 Text Emotion

Drive per-line emotion from a text description

By diodiogodยทCreated about a year agoยทUpdated 22 days agoยท 1,098
๐ŸŒˆ IndexTTS-2 Text Emotion
    • emotion_control
    โ—„qwen_modelqwen0.6bemo4-mergeโ–บ
    โ—„emotion_textHappy character speaking: {seg}โ–บ

    IndexTTS-2's whole party trick is fine-grained emotion control, and this is one of the ways you feed it. Instead of dialing in eight emotion sliders by hand, you write a plain-language description of how a line should feel - "Worried parent speaking" - and a small Qwen emotion model reads it and produces the emotion conditioning IndexTTS-2 needs. It's the text-driven path to expressive speech, and it plugs into IndexTTS-2's emotion_control input.

    The clever part is the {seg} template. You don't have to hand-write an emotion for every line; you write one template with a {seg} placeholder, and the node applies it per segment by dropping each actual line into that slot. Context-aware emotion, generated on the fly, without you annotating every sentence.

    How it works

    The node runs a compact Qwen emotion model over your text. Whatever you put in emotion_text becomes the framing; {seg} is where the current line's text gets substituted at generation time. So "Happy character speaking: {seg}" tells the model to interpret each line as a happy character would say it, adapting to the words of that specific line. The output is an EMOTION_CONTROL object - the conditioning - which you wire into an IndexTTS-2 setup. There, it can be blended with audio emotion references and vector emotion; this node is the text source of that blend.

    The inputs and outputs that matter

    There are only two fields, and one of them has one option:

    • emotion_text - the emotion prompt, with {seg} as the per-line placeholder. This is the whole node. Write it as an instruction about how the line is delivered, e.g. "Nervous teenager, unsure of himself: {seg}" - and let the model adapt line by line.
    • qwen_model - one choice, qwen0.6bemo4-merge. Nothing to decide.

    Output: emotion_control (EMOTION_CONTROL) โ†’ into the IndexTTS-2 emotion input, where it can stand alone or blend with an audio emotion reference.

    Installing it

    Bundled with the pack (it's part of the IndexTTS-2 engine set). ComfyUI Manager โ†’ search "TTS Audio Suite" โ†’ install โ†’ restart. Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/diodiogod/TTS-Audio-Suite.git
    cd TTS-Audio-Suite
    python install.py
    

    The small Qwen emotion model auto-downloads on first use, and IndexTTS-2's own weights download separately when you generate.

    Common issues & troubleshooting

    The emotion doesn't come through in the audio. This node only produces the emotion conditioning; IndexTTS-2 has to be set up to use it, and how strongly it lands depends on IndexTTS-2's emotion intensity (its emotion alpha) on the engine/generation side. If the effect is too subtle, the strength control lives over there, not here - this node just supplies the signal.

    {seg} came out spoken literally. The {seg} placeholder belongs in emotion_text, the emotion prompt - not in the actual line the TTS reads. If "seg" is being spoken, you put the placeholder in the wrong field. Keep the emotion template and the spoken text separate.

    Every line has the same flat emotion. Use the {seg} template so the model re-reads each line in context, rather than a static description that ignores what the line actually says. A template like "Reacting to bad news: {seg}" adapts; a bare "sad" does not.

    It's overkill for what I need. If you just want one fixed emotion, IndexTTS-2's manual emotion vectors or a named emotion may be simpler. This node earns its place when you want dynamic, per-segment emotion driven by the text itself.

    CategoryTTS Audio Suite/Engines/IndexTTS-2

    Inputs (2)

    NameTypeDefaultDescription
    qwen_modelCOMBOqwen0.6bemo4-mergeQwenEmotion model for text emotion analysis. Use 'local:' prefix for local models or select from available downloadable models.
    emotion_textSTRINGHappy character speaking: {seg}Text describing the desired emotion. Use {seg} placeholder for dynamic per-segment analysis (e.g., 'Angry man shouting: {seg}', 'Calm narrator: {seg}'). Without {seg}, applies same emotion to all segments.

    Outputs (1)

    NameTypeDescription
    emotion_controlEMOTION_CONTROLโ€”