Base64 => Audio
Your app's audio, straight into ComfyUI — no temp files involved
- audio
What this node actually does
Hand this node a base64-encoded audio blob and it hands you back a real AUDIO signal you can wire into the rest of your graph - audio conditioning nodes, a player, whatever your pipeline does with sound. The whole point is that the audio never has to touch disk as a file. It arrives as a string, leaves as a tensor.
That matters more than it sounds. ComfyUI's API is JSON-based, and JSON can't carry raw binary. Any bytes that cross the HTTP or websocket boundary - from your web app, a mobile client, a remote worker, an external service - have to ride along as base64. That's the string you paste into this node, and the reason this pack exists at all. The README says it plainly: the nodes are for "integrating with the ComfyUI API implementation."
How it works
The mechanism is refreshingly direct. The node decodes your base64 string back into raw audio bytes and pipes them into ffmpeg with -acodec pcm_f32le -f f32le, turning whatever you gave it (mp3, wav, ogg, m4a - anything ffmpeg reads) into a float32 waveform. It parses the sample rate and channel count out of ffmpeg's own output, reshapes the stream, and returns the standard ComfyUI audio dict: {'waveform': tensor, 'sample_rate': int}.
If that output shape looks familiar, it should - it's the same format VideoHelperSuite and ComfyUI's own audio nodes emit. The pack is literally built on top of VideoHelperSuite and PMSnodes (both credited in the README), so whatever consumes audio in your graph will accept what this node produces.
Inputs and output
There's exactly one required input, plus two optional trim knobs:
- base64 (STRING, multiline) - the audio file's bytes, base64-encoded. This is the only thing you must provide.
- start_time (FLOAT, default 0, seconds) - where in the audio to start decoding. Only applies if it's greater than 0.
- duration (FLOAT, default 0, seconds, max 10000000) - how many seconds to decode. 0 means "through the end."
The output is a single audio (AUDIO) socket. If you're feeding a text-to-speech or audio-conditioning workflow from an external client, wire this straight into whatever consumes AUDIO.
Installing it
Via ComfyUI Manager, search for ComfyUI-Base64-Nodes and install, then restart. Or, the manual way:
cd ComfyUI/custom_nodes
git clone https://github.com/dewittethomas/ComfyUI-Base64-Nodes
pip install -r requirements.txt # imageio-ffmpeg
Then restart ComfyUI and look for Base64 => Audio under the Base64-Nodes category. There are no model downloads - the entire dependency footprint is imageio-ffmpeg, which bundles a static ffmpeg binary so you don't need ffmpeg installed system-wide.
Where people get burned
- Data URIs break it. Paste the raw base64 of the file bytes, not
data:audio/mp3;base64,..... The decoder chokes on the prefix. Strip it before you send it. - Skipped requirements. If you clone by hand and never run
pip install -r requirements.txt, the first run dies with animageio_ffmpegimport error. Manager handles this for you; manual installs don't. - The trim knobs do nothing at 0.
durationof 0 isn't "zero seconds of audio," it's "everything." Set it only when you actually want to cut. - It's invisible in the UI. Nothing renders, no file appears. If your only goal was to hear the audio, you need to wire the AUDIO output into a player or save node - this node is just the decoder half.
One more thing worth saying: in an ecosystem where custom nodes have shipped malware, this one is about as boring as it gets - a couple hundred lines, MIT licensed, no network calls, no model files. It decodes strings and pipes them to ffmpeg. That's it. It's a dev tool for people building on the ComfyUI API, not a model pack, which is why you won't find much Reddit chatter about it. If you're the one writing the web client, that's exactly what you want.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| base64 | STRING | — | |
| start_timeopt | FLOAT | 0.00 | — |
| durationopt | FLOAT | 0.000–10000000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| audio | AUDIO | — |