Nodes/KlingComfyUI/Kling Load Audio (Ace Data Cloud)
ComfyUI Node

Kling Load Audio (Ace Data Cloud)

Getting an API's MP3 back into your graph

By AceDataCloud·Created 3 days ago·Updated 2 days ago· 0
Kling Load Audio (Ace Data Cloud)
    • audio
    ◄media_url►

    What it's for

    Kling's talking-photo and lip-sync nodes can be driven by an audio URL, and when they're done they hand you back a video - plus, in some flows, the audio that went with it. Either way, audio shows up in this pack as a URL string on Ace's CDN. This node is the one that turns that string into ComfyUI's native AUDIO type so the rest of your graph can use it: save it, drive a local avatar model with it, feed it to an audio-reactive node, splice it into a longer sequence.

    If your plan is "use Kling for the talking head, then keep working locally" - which is the sane division of labor, because the open tools are good at using audio and only LTX is good at generating it - you need this adapter or you're stuck exporting files by hand.

    How it works

    media_url in, audio out. The download half is identical to the video loader: HTTPS only, one of four allowlisted Ace CDN hosts, no redirects, a 128 MiB size cap enforced while streaming, three attempts with backoff. If you try to point it at an arbitrary podcast file, it tells you to use an Ace CDN link.

    The decoding half uses PyAV - the FFmpeg bindings ComfyUI already ships with rather than a new dependency - to open the container, find the first audio stream, and decode every frame into a tensor. Samples come out respecting the stream's channel layout, and integer sample formats (int16, int32) are scaled into the float range that ComfyUI's audio nodes expect. The output is a dictionary with waveform shaped for the standard (batch, channels, samples) convention and the sample_rate taken from the codec context.

    That's the pleasing part of this pack's design: it doesn't smuggle in a second media stack. It borrows ComfyUI's. Which is also why the version requirement matters - the native media loaders want ComfyUI 0.39.0 or newer.

    Inputs and outputs

    • media_url (STRING) - the Ace CDN audio URL.
    • audio (AUDIO) - a standard waveform-plus-sample-rate dictionary.

    Empty input gets you "Task is pending; retrieve the same task ID again." - the pack reusing the same wording as the video loader, meaning: the job that was supposed to produce this URL hasn't finished.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/AceDataCloud/KlingComfyUI
    cd KlingComfyUI && python -m pip install -r requirements.txt
    # restart ComfyUI
    

    Manager: search Kling, publisher acedatacloud, package Kling by Ace Data Cloud, Registry ID kling. Requirements are requests and jsonschema; decoding leans on libraries ComfyUI already has.

    export ACEDATACLOUD_API_KEY=your_key_here   # then restart ComfyUI
    

    Common issues

    "The media link contains no audio stream." You handed it a video-only file. That happens if you point the audio loader at a Kling clip that came back silent - talking-photo output without an audio track, for instance. Check the source with ffprobe rather than assuming the loader's broken; the message is accurate.

    "Unsupported audio sample format." Uncommon, but real: the code accepts float, int16 and int32 sample data and refuses anything else rather than guessing. It's a container/codec mismatch, not corruption in your file.

    Voice speed and language belong upstream. If the audio sounds wrong - too fast, wrong accent - that's not this node. It's voice_speed and voice_language on Kling Lip Sync, or speech_rate on Kling Video Commerce. The loader is a pipe and doesn't touch the signal beyond scaling sample values.

    No caching. Every run re-downloads from the CDN. For an audio bed that never changes, save it once rather than re-fetching it on every queue.

    Long audio and the size cap. A 128 MiB ceiling is generous for speech and tight for a long lossless track. Compressed speech clips will never get close; don't assume the same for everything.

    CategoryAce Data Cloud/Kling

    Inputs (1)

    NameTypeDefaultDescription
    media_urlSTRING—

    Outputs (1)

    NameTypeDescription
    audioAUDIO—