Nodes/ComfyUI-JM-KLing-API/KLingAI Lip Sync
ComfyUI Node

KLingAI Lip Sync

Make a Kling video's mouth match audio

By juemingai·Created about a year ago·Updated 11 months ago· 3
KLingAI Lip Sync
    • task_id
    • task_status
    • update_time
    • seed
    api_token
    video_id
    video_url
    modetext2video
    text
    voice_idgirlfriend_1_speech02
    voice_languagezh
    voice_speed1.0
    audio_typeurl
    audio_url
    audio_file
    callback_url
    seed-1

    This is the node that turns a character video into a character talking video. KLingAI Lip Sync takes a video you already generated (via text2video or image2video in this same pack), attaches speech, and returns a new clip where the mouth movements match the audio. It's Kling's lip-sync API (/v1/videos/lip-sync) wrapped as the usual async task node.

    The workflow shape matters here: this node does not generate the base video. You need an existing video_id or video_url - the output of a prior generation - plus speech in one of two forms. That's the whole design: generate the scene first, then bring it to life.

    Two modes, chosen by mode

    • text2video - give it a text script and a voice_id, and Kling synthesizes the audio itself via TTS before syncing. The default voice is girlfriend_1_speech02 (yes, that's the literal ID - this pack's defaults come straight from Kling's voice catalog), with voice_language (zh or en) and voice_speed (0.8–2.0) to shape it.
    • audio2video - you supply real audio instead. Set audio_type to file or url, then audio_file (a local path) or audio_url. This is the mode for a pre-recorded VO, an existing podcast clip, anything with real sound.

    Inputs that matter

    • api_token (required) - the JWT from the API Key node, as everywhere.
    • video_id / video_url - the source video. Either works; video_id is what a generation node's task gives you downstream of Query Status.
    • text - only used in text2video mode.
    • voice_id / voice_language / voice_speed - only used in text2video mode.
    • audio_file / audio_url / audio_type - only used in audio2video mode.
    • callback_url / seed - optional plumbing; seed is local-only.

    The output

    task_id, task_status, update_time (all STRING) and seed (INT) - note update_time here instead of the created_at/updated_at pair the video nodes use. Same flow regardless: task_id into Query Status (set task_type to lip-sync), and the result URL into the Video Downloader.

    Where people get burned

    • No video, no sync. The most common mistake is treating this as text-to-talking-video and skipping the generation step. It needs a video in, full stop.
    • Wrong mode's inputs ignored. Set mode to text2video but feed audio_url - it won't pick up the audio. Mode decides which inputs matter; the ignored ones just sit there.
    • Voice IDs from the catalog. girlfriend_1_speech02 is a Kling default, not a suggestion. If you want a specific voice, check Kling's current voice list for a valid ID - a bad one fails the task server-side.
    • Chinese-first defaults. voice_language defaults to zh and the README's framing is Chinese-community flavored; flip it to en if that's what you're syncing.
    • Async, obviously. Task ID out, not a video. Query Status → Downloader, same as every generation node in this pack.
    CategoryJM-KLingAI-API/lip-sync

    Inputs (13)

    NameTypeDefaultDescription
    api_tokenSTRING
    video_idoptSTRING
    video_urloptSTRING
    modeoptCOMBOtext2video2 options: text2video, audio2video
    textoptSTRING
    voice_idoptSTRINGgirlfriend_1_speech02
    voice_languageoptCOMBOzh2 options: zh, en
    voice_speedoptFLOAT1.00.8–2
    audio_typeoptCOMBOurl2 options: file, url
    audio_urloptSTRING
    audio_fileoptSTRING
    callback_urloptSTRING
    seedoptINT-1-1–18446744073709550000

    Outputs (4)

    NameTypeDescription
    task_idSTRING
    task_statusSTRING
    update_timeSTRING
    seedINT