Load Audio (from Path)
Load Audio (from Path)
- AUDIO
ComfyUI has no native "load an mp3" node, which is why every audio-reactive pack ships its own loader. This is the one from ComfyUI-AudioReactor, and it's the boring node every other node in the pack is useless without. Its one job: turn a file on disk into the AUDIO format that Audio Frame Transform (Beats) and Audio Frame Transform (Shadertoy) expect.
The twist is in the name - "from Path." There is no file browser here. path is a plain text field, and the default value, X://insert/path/here.mp4, is the author's way of telling you you'll be typing. That's the single biggest trap for beginners, so get it out of the way early: this loader expects the absolute path to your file, not a picker, and if you're on Linux or macOS that default is a Windows placeholder you need to replace entirely.
Under the hood it's a one-line call to librosa.load(path, sr=sample_rate, offset=offset, duration=duration). That means it reads whatever the librosa/soundfile stack can decode - wav, flac, ogg, mp3, and via the audioread fallback even mp4 and mkv. Audio comes back mono, resampled to whatever you set in sample_rate.
The inputs that matter, all four of them:
path- the full path to your audio file. No tilde expansion, no browser widget; type the real absolute path.sample_rate- target sample rate in Hz, 6000 to 192000, default 22050. This is a resample, not a hint. Leave it at 22050 and the transform nodes analyze exactly what you loaded; raise it to 44100 and that's fine too, as long as the transform's sample_rate matches.offset- seconds to skip at the start (default 0).duration- how many seconds to load (default 0, which means the whole file).
One output: AUDIO. Wire it into either of the pack's two transform nodes.
Install is the standard custom-node song. In ComfyUI Manager, search "ComfyUI-AudioReactor," or:
cd ComfyUI/custom_nodes
git clone https://github.com/tocubed/ComfyUI-AudioReactor
cd ComfyUI-AudioReactor
pip install -r requirements.txt
then restart ComfyUI. There are no model downloads - nothing in this pack ships a checkpoint - but librosa is the heavyweight dependency, and it drags numba and scipy in on install. No big deal, just not instant.
Where people get burned: the moment you feed it an mp3 or mp4 and librosa can't find a decoder, you'll get a "Couldn't find ffmpeg or avconv" style error. That's the audioread backend shelling out to ffmpeg, which has to be on your PATH; install ffmpeg and the same file loads. And remember the transforms downstream need sample_rate to match this node's - mismatches sound like audio at the wrong speed, and your beat detection will be analyzing nonsense.
It's a tiny node with a near-zero footprint on the internet; this pack is a personal project from early 2024, not a famous name. But it's the front door to the pack, and it's the one you'll actually run every time.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| path | STRING | X://insert/path/here.mp4 | — |
| sample_rate | INT | 220506000–192000 | — |
| offset | FLOAT | 0.0000–1000000 | — |
| duration | FLOAT | 0.0000–1000000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| AUDIO | AUDIO | — |