AudioGetTempo
Detect the BPM of an audio clip
- audio
- tempo_string
- tempo_float
- tempo_integer
AudioGetTempo listens to a clip and tells you its tempo in BPM, using onset detection - no tapping along to a metronome, no guessing. It's the smallest, simplest node in the audio-separation-nodes-comfyui pack: one input, and it just answers a question.
Why you'd reach for it
Tempo is the kind of number you need constantly once you start chaining audio nodes together, and this is the node that gives it to you without leaving ComfyUI. Feed it a track before you decide how much to speed it up with AudioSpeedShift, or use it to sanity-check what AudioTempoMatch is about to do to two clips. It's also just useful on its own - you've got a stem or a generated track and genuinely don't know its BPM; wire it in, run once, done.
How it works
The node description says it uses onset detection, and librosa (a listed dependency of the pack) is the standard tool for exactly this - its beat-tracking functions find note onsets in the waveform and estimate a tempo from the spacing between them. One thing worth knowing about any tempo estimator built this way, not just this one: they're prone to octave errors, meaning they'll sometimes report double or half the tempo you'd tap out by hand (calling a song 70 BPM "140," or the reverse). If the number looks implausible for the genre, that's usually what happened - halve or double it and see if that matches what you'd expect.
The inputs and outputs that matter
One required input:
audio- the clip you want the tempo of.
No optional settings to configure - this node just runs.
Three outputs, all representing the same detected tempo in different formats:
tempo_string- the tempo as a STRING.tempo_float- the tempo as a FLOAT.tempo_integer- the tempo as an INTEGER.
The point of giving you three formats instead of one is wiring convenience: grab tempo_string if you're displaying it or saving it into a filename/metadata field, tempo_float if you're feeding it into a math node to calculate a speed-shift ratio, and tempo_integer if whatever's downstream wants a whole number.
Installing it
Search audio-separation-nodes-comfyui in ComfyUI Manager, or manually: cd ComfyUI/custom_nodes && git clone https://github.com/christian-byrne/audio-separation-nodes-comfyui, cd in, pip install -r requirements.txt, restart ComfyUI. This node runs on librosa alone - no model checkpoint, no GPU requirement, and it's fast even on longer clips.
Common issues
Nothing model-related to troubleshoot here - the pack's documented Demucs checkpoint issue only affects AudioSeparation. The one thing to watch for is the octave-error behavior mentioned above: if a detected tempo looks off by a clean factor of two from what you'd expect, that's a known limitation of onset-based tempo estimation in general, not a bug specific to this node. Cross-check against what you know about the track (or your ears) before trusting the number blindly for something precision-dependent like a beat-synced edit.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| audio | AUDIO | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| tempo_string | STRING | — |
| tempo_float | FLOAT | — |
| tempo_integer | INTEGER | — |