Nodes/Comfy Audio Nodes/Audio Properties
ComfyUI Node

Audio Properties

Samples, sample rate, duration, channels in one look

By dnnagy·Created 3 months ago·Updated 3 months ago· 0
Audio Properties
  • audio
  • samples
  • duration
  • sample_rate
  • num_channels
  • isNone

AudioProperties is the stethoscope of the comfy-audio-nodes pack: plug in any AUDIO signal and it tells you sample count, duration, sample rate, and channel count. If you've ever wired up a video-with-audio workflow and silently hoped the rates matched, this is the node that turns hoping into knowing. It's the smallest, least glamorous member of the pack, and for a debug-obsessed workflow it's arguably the most useful one.

Here's why you'll actually reach for it. The ComfyUI AUDIO type is just a dict - a waveform tensor of shape [batch, channels, samples] plus a sample_rate int. Audio models hand these around without labels, so the only way to know what you're holding is to look. The node reads the tensor's shape: samples come from the last dimension, channel count from the second-to-last, and duration is computed as samples / sample_rate. That last one is handy beyond mere curiosity - video is timed in seconds and frames, so feeding duration into a video-length or framing node keeps audio and picture honest with each other.

The input side is where this node has a personality:

  • audio (AUDIO, optional) - the only input, and you can leave it disconnected. It won't crash; it returns -1 for every numeric output and isNone = True.

That optional-input behavior is the author's own design (it's in the README), and it's genuinely useful. Wire it into a conditional/switch setup and isNone becomes a "is anything even plugged in here" flag you can branch on, instead of a red error brick in your graph.

The outputs, in order:

  • samples (INT) - samples per channel.
  • duration (FLOAT) - seconds.
  • sample_rate (INT) - Hz.
  • num_channels (INT) - 1 for mono, 2 for stereo, more for surround.
  • isNone (BOOLEAN) - True when the input is disconnected.

Real talk on how it fits: this is the node you reach for when MergeAudioChannels throws its "sample rates differ" ValueError, or when you can't tell whether your LTX-2 audio VAE decode came out mono or stereo, or when a VHS save seems to think your clip is half a second long and you want the numbers to explain why. It's a measurement tool, not a transformer - it never alters audio, so the only way to break anything with it is to ignore what it tells you.

The honest caveats: the pack itself is abandoned. The README declares it unmaintained and moves all nodes to comfy-random-toolpack, where this one is CRTP_AudioProperties. The shipped code is a handful of tensor reads with no dependencies at all - nothing in it can really rot - but the class name you're googling is the old namespace.

Install it the usual way: ComfyUI Manager, search "Comfy Audio Nodes," or:

cd ComfyUI/custom_nodes
git clone https://github.com/dnnagy/comfy-audio-nodes.git

Restart ComfyUI and it's under the audio category. No requirements, no model files, no downloads. One quirk to expect: a disconnected input gives you -1s and isNone = True, not zeros - don't read that as a bug.

Categoryaudio

Inputs (1)

NameTypeDefaultDescription
audiooptAUDIO

Outputs (5)

NameTypeDescription
samplesINT
durationFLOAT
sample_rateINT
num_channelsINT
isNoneBOOLEAN