Audio Property
Read a clip's sample rate
- audio
- sampl_rate
A small utility node with one job: read the sample rate off an AUDIO clip. Not glamorous, but it's the node you reach for constantly once you're actually building a pipeline - checking whether two clips match before concatenating them, confirming a clip is at 16kHz before you feed it to Whisper, sanity-checking a resample actually did what you asked.
How it works
It just reads the sample rate field off the AUDIO object's metadata - no processing, no waveform inspection beyond that single value. Given the pack's AUDIO type is a waveform-plus-sample-rate pair, this node exposes the "plus sample rate" half of that as a usable number in the graph.
The inputs and outputs that matter
audio- the clip to inspect, required, the only input.- The output is a single
INT. Note the schema spells itsampl_rate(yes, missing an "e") - worth knowing if you're ever wiring this by name in a script or searching for it, since that's the literal field name the node exposes, not a typo on this page.
How to install it
ComfyUI Manager: search ComfyUI-speech-dataset-toolkit, install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/kale4eat/ComfyUI-speech-dataset-toolkit
cd ComfyUI-speech-dataset-toolkit
pip install torchaudio --index-url https://download.pytorch.org/whl/cu121
pip install -r requirements.txt
No extra dependencies - this is the lightest node in the whole pack.
Common issues & troubleshooting
Wiring the output and getting a type error. It's an INT, not a FLOAT or STRING - if a downstream node expects a different numeric type, you may need a conversion node between them depending on what else is in your graph.
Only getting sample rate, wanted duration or channel count too. That's genuinely all this node exposes - sample rate only. There's no separate node in this pack for duration or channel count in the set covered here; if you need duration, you'd typically compute it elsewhere from the raw waveform length divided by sample rate, which isn't something this node's output alone gives you.
Using this to debug a concatenation or resample mismatch. That's exactly what it's for - run it on both clips before joining or comparing them with SDT_ConcatAudio or SDT_ResampleAudio, rather than discovering a mismatch after the fact from a garbled or erroring downstream result.
Worth wiring in even when you think you already know the rate. Audio that came from LoadAudio, got pulled off the internet, or was exported by some other tool doesn't always arrive at the rate you assume - a file labeled "16kHz" from a dataset you downloaded can genuinely be something else. A quick SDT_AudioProperty check before you build a multi-step pipeline around an assumption is cheap insurance against debugging a mismatch three nodes downstream where it's far less obvious what went wrong.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| audio | AUDIO | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| sampl_rate | INT | — |