Nodes/ComfyUI API Toolkit/ElevenLabs - Text to Dialogue with Timestamps
ComfyUI Node

ElevenLabs - Text to Dialogue with Timestamps

Ten Voices, One Take, With Word-Level Timestamps

By IxMxAMAR·Created 7 months ago·Updated 23 days ago· 1
ElevenLabs - Text to Dialogue with Timestamps
    • audio
    • timestamps_json
    • voice_segments_json
    ◄api_key►
    ◄text1►
    ◄voice_id1►
    ◄text2►
    ◄voice_id2►
    ◄text3►
    ◄voice_id3►
    ◄text4►
    ◄voice_id4►
    ◄text5►
    ◄voice_id5►
    ◄text6►
    ◄voice_id6►
    ◄text7►
    ◄voice_id7►
    ◄text8►
    ◄voice_id8►
    ◄text9►
    ◄voice_id9►
    ◄text10►
    ◄voice_id10►
    ◄stability0.50►
    ◄apply_text_normalizationauto►
    ◄languageAuto Detect►
    ◄output_formatmp3_44100_192►
    ◄seed0►
    ◄modeleleven_v3►
    ◄previous_text►
    ◄future_text►
    ◄use_pvc_as_ivcfalse►
    ◄pronunciation_dictionary_locators►

    The local TTS situation is genuinely good now - Chatterbox closed most of the gap, Kokoro and Piper run on a CPU. What none of them hand you is the thing you actually need the moment two characters talk to each other: a single continuous take where speaker A stops and speaker B starts, plus a machine-readable map of when every word happened. That's this node. Dialogue in, one audio file out, and two JSON blobs that tell you exactly who said what and at what millisecond.

    What you get out of it

    Three outputs, and the third one is the reason to care:

    • audio - one AUDIO stream with all speakers mixed into a single take. Wire it to a SaveAudio node.
    • timestamps_json - character-level alignment from the API, pretty-printed.
    • voice_segments_json - the per-speaker segmentation the API returns, so you can tell which voice owns which stretch of the take.

    That last one is what makes this node worth the API key. Cut subtitles from it, drive a lip-sync node per segment, or drop markers in a timeline. Nine out of ten TTS nodes give you a waveform and wish you luck.

    The inputs that matter

    api_key, text1 and voice_id1 are required - that's speaker one. Speakers two through ten are optional pairs (text2/voice_id2 … text10/voice_id10). Grab voice ids from the pack's Voice Selector or Fetch Voices nodes, or straight out of your ElevenLabs dashboard.

    Here's the trap, and it's a quiet one: a speaker pair is only sent if both halves are filled in. Fill in text3 but leave voice_id3 blank and that line doesn't error, it just vanishes from the take. If a speaker is missing from your output, that's almost always why.

    Everything else is seasoning. stability is the one you'll actually touch - the tooltip spells it out honestly: under 0.5 is more expressive, over 0.5 is more consistent and flatter, 0.5 is the neutral middle. language defaults to Auto Detect (33 options), and output_format defaults to mp3_44100_192, which - per the tooltip - needs Creator tier or above. Downshift to mp3_44100_128 if you're on the free or Starter tier and it 4xx's on you.

    seed exists, but the tooltip says the quiet part out loud: determinism is not guaranteed. Treat it as a hint. previous_text and future_text take up to 100 characters of context from either side of this dialogue for continuity across multiple calls, use_pvc_as_ivc swaps in the instant-clone version of a professional voice, and pronunciation_dictionary_locators takes a JSON array of up to three dictionary id/version pairs - the escape hatch for names the model keeps mangling.

    How it works

    Straight API call, no local model. The node POSTs to /v1/text-to-dialogue/with-timestamps with an inputs array of {text, voice_id} objects, the stability setting, and the language code if you didn't leave it on Auto Detect. ElevenLabs returns base64 audio plus the alignment and voice-segment payloads; the node decodes the audio into a ComfyUI tensor and dumps both JSON structures into strings.

    Because it's an API node it implements IS_CHANGED, so re-queuing gives you a fresh generation instead of a cached one. Convenient, and also the reason a rerun costs money every time. Keys are password-masked in the UI, and ELEVENLABS_API_KEY in your environment works as a fallback if you'd rather not paste secrets into a workflow you're screenshotting.

    Installing

    ComfyUI Manager, search "API Toolkit", install, restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/IxMxAMAR/ComfyUI-API-Toolkit
    cd ComfyUI-API-Toolkit
    pip install -r requirements.txt
    

    The ElevenLabs side of the pack needs requests, soundfile and scipy. No models to download, nothing GPU-shaped. If you only want ElevenLabs, the same author ships it standalone as ComfyUI-ElevenLabs-Pro.

    When it goes wrong

    The node doesn't exist in your menu at all. Services in this pack load conditionally - if soundfile or scipy is missing, the whole ElevenLabs module sits out and the rest of ComfyUI carries on. That's a feature, and it's also why "I installed it and there are no ElevenLabs nodes" is the single most common report. Install the deps and restart.

    It's slow. Multi-speaker dialogue is a bigger job than plain TTS, and the node waits on it. Don't queue six variations and go make coffee with 10 speakers wired up.

    The API errors come through verbatim. This pack's error handler surfaces whatever ElevenLabs said, so an auth failure, a tier restriction, or a voice id that isn't yours will tell you plainly what it is. Read the message before you start re-wiring the graph.

    CategoryAPI Toolkit/ElevenLabs/TTS

    Inputs (31)

    NameTypeDefaultDescription
    api_keySTRING—
    text1STRINGSpeaker 1 text.
    voice_id1STRINGSpeaker 1 voice ID.
    text2optSTRING—
    voice_id2optSTRING—
    text3optSTRING—
    voice_id3optSTRING—
    text4optSTRING—
    voice_id4optSTRING—
    text5optSTRING—
    voice_id5optSTRING—
    text6optSTRING—
    voice_id6optSTRING—
    text7optSTRING—
    voice_id7optSTRING—
    text8optSTRING—
    voice_id8optSTRING—
    text9optSTRING—
    voice_id9optSTRING—
    text10optSTRING—
    voice_id10optSTRING—
    stabilityoptFLOAT0.500–1Voice stability. Lower = more expressive/emotional, Higher = more consistent/monotone. Creative(<0.5), Natural(0.5), Robust(>0.5).
    apply_text_normalizationoptCOMBOauto3 options: auto, on, off
    languageoptCOMBOAuto Detect33 options: Auto Detect, English (en), Arabic (ar), Bulgarian (bg), Chinese (zh), Croatian (hr), +27
    output_formatoptCOMBOmp3_44100_192Audio output format. mp3_44100_192 and opus require Creator tier+.
    seedoptINT00–4294967295Seed for reproducibility. 0 = random. Determinism not guaranteed.
    modeloptCOMBOeleven_v32 options: eleven_v3, eleven_v4
    previous_textoptSTRINGContext only: up to 100 characters that come right BEFORE this dialogue, for continuity. Not supported by every model.
    future_textoptSTRINGContext only: up to 100 characters that come right AFTER this dialogue, for continuity. Not supported by every model.
    use_pvc_as_ivcoptBOOLEANfalseUse the IVC version of a Professional Voice Clone.
    pronunciation_dictionary_locatorsoptSTRINGJSON array of {"pronunciation_dictionary_id": ..., "version_id": ...} objects (up to 3).

    Outputs (3)

    NameTypeDescription
    audioAUDIO—
    timestamps_jsonSTRING—
    voice_segments_jsonSTRING—