Audio Analyzer Upload (Allergic)
Pick an audio file, get BPM and key — and actually hear it in the node
- AUDIO
- bpm
- key
- scale
- keyscale
If the Path variant of this pack is for people who type file paths, this is the one for everyone else. Audio Analyzer Upload (Allergic) does the same job - BPM and musical key detection - but instead of a raw string it gives you a dropdown of the audio files in your ComfyUI input folder, a proper upload button, and an in-node audio preview so you can hear what you're analyzing without leaving the graph. It's the friendlier front door to the same engine, and it's the one I'd actually reach for in a visual workflow.
How it works
Same engine as its sibling: librosa's beat tracker for tempo, then a chroma distribution correlated against the Krumhansl–Schmuckler major/minor key profiles to name the key and scale. No model, no downloads, CPU-only. What's different here is the front end:
- The
audioinput is a dropdown built by scanning your ComfyUI input directory at node-build time, filtered to audio/video content types, with ComfyUI'saudio_uploadflag so you can also upload or drag a file in. - It saves a tiny FLAC of the decoded audio to ComfyUI's temp directory and plays it back right on the node - instant confirmation you grabbed the right file.
- There's an "Analyze" button that calls the pack's
/allergic/audio_analyzer/analyzeAPI endpoint, so you can see BPM/key results without queueing a whole workflow. IS_CHANGEDhashes the file, so re-runs actually re-analyze when the file changes, andVALIDATE_INPUTSchecks the file still exists instead of failing mid-graph.
The AUDIO output is built with PyAV in the same {"waveform": tensor, "sample_rate": int} format ComfyUI's LoadAudio produces, so any node that eats an AUDIO tensor will accept it.
Inputs and outputs
One input, audio - a dropdown of audio/video files in ComfyUI/input (plus upload via the widget). Outputs:
AUDIO- decoded audio, same format as LoadAudio, wire it into audio-conditional or downstream nodesbpm(INT) - rounded tempokey(STRING) andscale(STRING) - e.g."G"and"minor"keyscale(COMBO) - combined as"G minor", typed as a COMBO so it plugs into dropdown inputs on other nodes
Installing it
Same pack, same steps. ComfyUI Manager, search "Allergic Audio", install, restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/usrname0/ComfyUI-AllergicAudio.git
cd ComfyUI-AllergicAudio
pip install .
The only real dependency is librosa, and it's a chunky one - numba, llvmlite, scipy ride along, so the first install takes a while and the first analysis compiles JIT code and can pause a beat. That's a one-time cost.
Gotchas
The obvious one: files must live in ComfyUI/input (or be uploaded through the widget). Drop the file there, refresh the node, and it appears in the dropdown. If your audio is somewhere else on disk, that's what the Path variant is for - this node won't browse outside its sandbox.
Long files are the other thing to watch. chroma_cqt is expensive relative to a plain STFT chroma, so a two-hour podcast will take noticeably longer than a three-minute song. Fine for loops and music; annoying for full-length media.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| audio | COMBO | 0 options: |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| AUDIO | AUDIO | — |
| bpm | INT | — |
| key | STRING | — |
| scale | STRING | — |
| keyscale | COMBO | — |