Nodes/ComfyUI-KokoroTTS-Zh/KokoroTextInput
ComfyUI Node

KokoroTextInput

The script box where blank lines control your pacing

By ruanjianlun·Created about a year ago·Updated about a year ago· 2
KokoroTextInput
    • KOKORO_TEXT
    texthello KokoroTTS!

    If KokoroTTSGenerator is where the speech happens, KokoroTextInput is where the script goes. It's the simplest node in the pack and the one you'll edit the most, because it's the text you're about to hear read back at you.

    What it is

    One multiline text box, one output. You type your narration, and the node splits it into paragraphs wherever there's a blank line. Each paragraph becomes a list of lines, and the whole thing goes out the KOKORO_TEXT output into the generator's text input. That's the entire job.

    Why the paragraph structure matters

    That structure isn't cosmetic - this is where people miss the point. The generator synthesizes each paragraph and inserts a chunk of silence between paragraphs, with the amount controlled by KokoroVoiceSelector. A blank line literally buys you a pause. And the voice selector's join_sentences option merges the sentences inside a paragraph into one chunk before synthesis. So how you lay out blank lines directly sets the pacing of the finished audio, before you ever open an audio editor. Short line per sentence, generous blank lines, and the output breathes; everything mashed together and it runs together.

    The input and output

    The one input is text, defaulting to "hello KokoroTTS!" - a bilingual hello you'll replace about ninety percent of the time. The multiline box is the whole UI: Enter for a new line, a blank line for a paragraph break. The output is a single KOKORO_TEXT wire that only feeds KokoroTTSGenerator.

    Gotchas

    First, what you type is what gets spoken - literally. The pack's own example workflow feeds in markdown, so a line like "# ComfyUI:AI绘画的超级引擎" gets the "#" read aloud as part of the sentence. There's no heading parsing and no markdown stripping. If you paste from a doc with headers or bullets, scrub them first or the voice will faithfully narrate your syntax.

    Second, the empty fallback: if you clear the box entirely, the node quietly substitutes a default Chinese sentence so the workflow doesn't break. Thoughtful, but it also means a blank box gives you unexpected speech - put your own text in.

    One nice thing: English words inside Chinese sentences generally survive, thanks to the English phonemizer the model loader sets up. Mixed narration like "hello my name is lisa 嘿,大家好!" works out of the box.

    Installing

    This node doesn't install alone - the whole pack comes together. ComfyUI Manager → search "ComfyUI-KokoroTTS-Zh", install, restart; or git clone https://github.com/ruanjianlun/ComfyUI-KokoroTTS-Zh into custom_nodes plus pip install -r requirements.txt. All four nodes appear under KokoroTTS. Since Kokoro is fast enough to iterate on, the cheap part of any talking-head or narration workflow is rewriting this text box and re-running - use it.

    CategoryKokoroTTS

    Inputs (1)

    NameTypeDefaultDescription
    textSTRINGhello KokoroTTS!

    Outputs (1)

    NameTypeDescription
    KOKORO_TEXTKOKORO_TEXT