Kling Voice Clone
Give Your Kling TTS an Actual Human Voice
- auth
- audio
- voice_id
The presets are fine for a narrator. They're wrong for the moment you're actually building toward: a lip-sync on a video of your person, or an avatar that should sound like the face on screen. That's the gap Kling Voice Clone fills. You feed it an audio sample, it phones Kling's API, and you get back a voice_id you can reuse in every TTS, lip-sync, and avatar node in this pack - the same voice, forever, until you clone a new one.
It's the audio sibling of the image-to-video "just make it match" instinct. Same move: give the model a reference, get consistent output. Here the reference is a voice and the output is a string.
How it works
Voice Clone is a pure API call - no local model, no GPU, no weights to download. It POSTs your audio to Kling's /v1/audio/voice-clone endpoint, waits for Kling's server to build the voice embedding, and returns the voice_id as a plain string.
If you wire in a ComfyUI AUDIO input, the node encodes it as base64 WAV before sending: it mixes to mono, resamples to 16 kHz, clips anything past 300 seconds, and - a nice touch in the source - loops audio shorter than 2 seconds instead of failing on it. Alternatively you can pass an audio_url and skip the local encoding entirely. Either path is fine; the node just needs one or the other.
Two things worth knowing before you run it. First, your sample leaves the machine and lands on Kling's servers - that's the whole mechanism, and it's exactly the privacy trade you sign up for with any API-wrapper node. Second, this is a metered call against your Kling credits. Cloning a voice is a cheap one-time operation, not a per-render cost, but it's not free.
Inputs and outputs
Only a few fields exist, and they're self-explanatory:
- auth (required) - the
KLING_AUTHoutput from the Kling AI Authentication node. Without it nothing in this pack runs. - audio (optional) - a ComfyUI
AUDIOtensor, if your sample comes from the graph. - audio_url (optional) - a URL to the sample instead. The tooltip says it plainly: "URL of an audio sample to clone the voice from."
Give it exactly one of those two. If you pass neither, it raises a clear error rather than guessing.
The single output is voice_id (a STRING). Wire it into TTS Advanced's voice_id field - that node's own tooltip explicitly says "use Voice Selector or Voice Clone" - or into the lip-sync and avatar nodes for a speaker that sounds like the person in the frame. The reference workflow 21_voice_clone.json ships in the pack if you want the minimal wiring.
Install
This is part of the ComfyUI-Kling-Direct pack, so you install the pack, not the node:
cd ComfyUI/custom_nodes
git clone https://github.com/IxMxAMAR/ComfyUI-Kling-Direct
Then restart ComfyUI. Easier still: ComfyUI Manager → Install Custom Nodes → search "Kling Direct". Dependencies are just requests / Pillow / numpy / torch / opencv-python, all of which ship with ComfyUI - no model files, nothing heavy.
You'll also need Kling API keys from https://app.klingai.com/global/dev. Note the README's honest caveat: new accounts require KYC activation before you can generate keys. Drop them in the Auth node, or set KLING_ACCESS_KEY / KLING_SECRET_KEY env vars and leave the fields blank.
Common issues
- "Requires either audio input or audio_url" - you left both empty. That's the error the node throws, and it's the most common stumble.
- A corrupted or empty
AUDIOdict - if the upstream audio node is broken, the encoder raises on an invalid sample rate or zero samples instead of crashing weirdly. v2.1 added those guards; the error message tells you the upstream node is the problem. - Nothing happens / keys rejected - check the Auth node and use the pack's Kling API Health Check node to verify connectivity in one click before blaming the clone.
- Sample quality matters. Kling's clone is only as good as what you feed it: one clean, single-speaker take beats a noisy recording every time. A 30–60 second clip is plenty.
One light aside: yes, this is a "clone a voice" API - use it on voices you actually own, or at least voices that won't be unhappy about it.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| auth | KLING_AUTH | — | |
| audioopt | AUDIO | — | |
| audio_urlopt | STRING | URL of an audio sample to clone the voice from. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| voice_id | STRING | — |