Nodes/comfyui-dreambait-nodes/Audio Info Plus + 🎵
ComfyUI Node

Audio Info Plus + 🎵

Read your audio file's vital signs in ComfyUI

By drmbt·Created 2 years ago·Updated 7 months ago· 6
Audio Info Plus + 🎵
  • audio_info
  • sample_rate
  • num_channels
  • duration
  • num_samples
  • file_path
  • file_name
  • file_extension
  • max_amplitude
  • mean_amplitude
  • rms_amplitude

Audio Info Plus is the metadata reader for the pack's audio side. Feed it an AUDIOINFO object - the second output of Load Audio Plus - and it unpacks ten numbers and strings you can route anywhere: sample rate, channel count, duration, sample count, file path, file name, extension, and three amplitude statistics (max, mean, and RMS). No audio processing happens; it's pure measurement, which is exactly why it's useful.

Why you'd bother

ComfyUI's AUDIO format is a blob - a waveform tensor plus a sample rate. It's not something you can interrogate inline. Audio Info Plus turns it into wires you can actually branch on. The practical pattern: use duration or num_samples as a condition upstream - e.g., skip normalization for clips under a second, or cap how much of an audio track feeds a sampler. sample_rate and num_channels are the ones you'll actually need when wiring audio into video frame logic, because mismatched rates and channels are the classic source of "why does this sound wrong" bugs.

The amplitude trio is the more interesting half. max_amplitude tells you if your file is clipping or near-silent at a glance; mean_amplitude and rms_amplitude give you the perceptual loudness picture. Combined with the pack's Normalize Audio node, this becomes a feedback loop: measure the level, route it into a condition, and decide whether normalization actually needs to run.

How it gets its numbers

The source is straightforward. It reads the waveform tensor carried inside the AUDIOINFO object (not the AUDIO output - they're separate wires), then computes:

  • max_amplitude = max of abs(waveform)
  • mean_amplitude = mean of abs(waveform)
  • rms_amplitude = sqrt of mean(waveform²)

Everything else is metadata that Load Audio Plus already collected when it opened the file. If you ever get "Audio info is None" as an error, it means you wired the audio output into this input instead of audio_info - an easy mistake since both sockets look similar. Double-check which one you connected.

Installing

It lives in drmbt/comfyui-dreambait-nodes. Through ComfyUI Manager, search "comfyui-dreambait-nodes"; manually:

cd ComfyUI/custom_nodes
git clone https://github.com/drmbt/comfyui-dreambait-nodes

then restart ComfyUI. Fair warning applies to the whole pack: the install pulls in the audio stack (torchaudio, librosa, moviepy, pyloudnorm) plus the heavy ML deps the pack bundles for other nodes, so it's a chunky install for a read-only node. If you're only doing audio metadata, this pack is still the natural home because its Load Audio Plus is what produces AUDIOINFO in the first place - they're designed as a pair.

Categoryaudio

Inputs (1)

NameTypeDefaultDescription
audio_infoAUDIOINFO

Outputs (10)

NameTypeDescription
sample_rateINT
num_channelsINT
durationFLOAT
num_samplesINT
file_pathSTRING
file_nameSTRING
file_extensionSTRING
max_amplitudeFLOAT
mean_amplitudeFLOAT
rms_amplitudeFLOAT