Nodes/ComfyUI-KLingAI-API/Lip Sync Text Input
ComfyUI Node

Lip Sync Text Input

Skip recording a voice, let KLing's TTS read the line

By KlingAIResearch·Created 2 years ago·Updated 10 months ago· 174
Lip Sync Text Input
    • input
    text
    voice_id
    voice_languagezh
    voice_speed1.0

    This is the other feeder node into Lip Sync - the one for when you don't have a voice recording and don't want to make one. Instead of pointing at an audio file like Lip-Sync-Audio-Input does, you type a line of text and pick a preset voice, and KLing generates the speech itself before syncing it to the video's mouth movement. It's the faster path when you're prototyping dialogue or don't need a specific human voice - no recording, no editing, just text in.

    How it works

    Like its audio-input sibling, this node doesn't do anything generative on its own - it packages your text and voice settings into the KLING_AI_API_LIPSYNC_INPUT type that Lip Sync requires. The actual text-to-speech synthesis and the lip-sync work both happen downstream, on KLing's servers, once Lip Sync submits the job.

    The inputs and outputs that matter

    All four fields are required:

    • text - the line to be spoken, multiline so you're not stuck to a single sentence.
    • voice_id - a preset voice, and there's a real gotcha worth flagging here: the schema lists 61 choices, and a good number of them show up as raw Chinese labels (things like "阳光少年" or "运动少年") rather than translated English names, even though voice_language supports en. If you're not reading Chinese, expect to preview a few before you find one that sounds right - there's no obvious way to tell tone or gender from the label alone in that case.
    • voice_language - zh or en, default zh. Set this to match the language of your text, not necessarily the voice's native label.
    • voice_speed - 0.8 to 2, default 1. Slower for a more deliberate read, faster for something snappier; large jumps in either direction start to sound unnatural, so nudge it rather than maxing it out on the first try.

    The output is input, typed KLING_AI_API_LIPSYNC_INPUT - it only plugs into the input slot on Lip Sync, same as Lip-Sync-Audio-Input's output.

    Installing it

    Comes with the rest of the pack. ComfyUI Manager: search ComfyUI-KLingAI-API, install, restart. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/KwaiVGI/ComfyUI-KLingAI-API
    cd ComfyUI-KLingAI-API && pip install -r requirements.txt
    

    This node itself doesn't need a Client - it's just building the request payload - but Lip Sync downstream absolutely does, so make sure a Client node with a valid KLing key is wired in before running the full graph.

    Common issues

    Mismatching voice_language and the actual language of your text is the easiest mistake - set it to en for English text even if the voice_id you picked has a Chinese label, since the label is just the preset's name, not a hard language lock. If the synced result sounds off-timed to the video, remember the timing is driven by however long KLing's TTS renders your text at the chosen voice_speed - a longer line than the target video's runtime is going to get compressed or cut, so keep text roughly matched to how long the video actually is. Beyond that, this is downstream of Lip Sync's own requirements: a missing face_id isn't this node's problem to fix, and an authentication failure traces back to the Client node, not here.

    CategoryKLingAI

    Inputs (4)

    NameTypeDefaultDescription
    textSTRING
    voice_idCOMBO61 options: 阳光少年, 懂事小弟, 运动少年, 青春少女, 温柔小妹, 元气少女, +55
    voice_languageCOMBOzh2 options: zh, en
    voice_speedFLOAT1.00.8–2

    Outputs (1)

    NameTypeDescription
    inputKLING_AI_API_LIPSYNC_INPUT