Overview
This node integrates with the Kling AI platform to apply lip sync effects to a Kling video by either generating audio from text using text-to-speech (TTS) or by using an existing audio file from a URL. It is useful for automating the creation of synchronized talking videos where the audio matches the lip movements in the video.
Common scenarios include:
- Creating personalized video messages with custom speech generated from text.
- Syncing pre-recorded audio files to existing Kling videos.
- Enhancing video content with emotional and voice style variations via TTS.
For example, you can input a Kling video task ID and provide text to generate speech in a chosen voice and emotion, then produce a new video with lip sync applied automatically.
Properties
| Name | Meaning |
|---|---|
| Original Task ID | The task ID of the original Kling video to which lip sync will be applied. |
| Audio Source | Source of audio for lip syncing: - Text-to-Speech: Generate audio from text using TTS - Audio URL: Use existing audio file from URL |
| TTS Text | Text to convert to speech (required if Audio Source is Text-to-Speech). |
| Voice | Voice to use for text-to-speech. Options are dynamically loaded but include voices like "Rock", "Funny", "Gentle". |
| Emotion | Emotional style for the selected voice, e.g., Happy, Sad, Angry, Neutral, Calm, Excited. |
| Speech Speed | Speed of the speech, ranging from 0.8 to 2 (default 1). |
| Audio URL | URL to your audio file (mp3, wav, flac, ogg) (required if Audio Source is Audio URL). |
| Wait for Completion | Whether to wait for the lip sync task to complete before returning output (boolean). |
Output
The node outputs JSON data containing details about the created lip sync task:
task_id: The ID of the newly created lip sync task.- Other metadata related to the task status and configuration as returned by the Kling API.
If "Wait for Completion" is enabled, the output JSON will contain the final completed task data after processing finishes.
No binary data output is produced by this node.
Dependencies
- Requires an active API key credential for the Kling AI platform.
- Makes HTTP requests to the Kling API endpoints to create and optionally wait for lip sync tasks.
- Uses helper functions for API requests and waiting for asynchronous task completion.
Troubleshooting
- Invalid audio URL error: If the provided audio URL is malformed or invalid, the node throws an error indicating the URL issue. Ensure the URL is correctly formatted and accessible.
- API Error: If the Kling API returns an error code other than 200, the node throws an error with the message from the API. Check your API key validity, network connectivity, and request parameters.
- Missing required parameters: Required fields such as Original Task ID, TTS Text (if using TTS), or Audio URL (if using audio URL) must be provided; otherwise, the node will fail.
- Waiting for completion: Enabling "Wait for Completion" may increase execution time depending on task duration. Disable it if immediate response is preferred.
Links and References
- Kling AI Platform Documentation (for API details and usage)
- Text-to-Speech Voices and Emotions (endpoint used to load available voices and emotions)