Audio Resample β‘π ‘π π £π
Change the sample rate for compatibility, without touching pitch or duration
- audio
- AUDIO
Don't confuse this one with AudioTimeStretch or AudioPitchShift - those change how the audio sounds. This is a format/compatibility operation: it changes the sample rate the audio is stored at, done properly, which means pitch and duration both stay exactly where they were. What changes is how many samples per second represent that same audio - relevant when a downstream model or node expects a specific rate and your source doesn't match it.
Inputs and outputs
audio- the clip to resample.new_sample_rate- 8000 to 192000 Hz, default 44100.
Output is a single AUDIO.
When you actually need this
Audio models and audio-processing nodes are often picky about sample rate - expecting exactly 44100 or 48000 Hz, for instance - and if your source clip doesn't match, you can hit an error or silently degraded results further down the chain. This node is the fix: match the rate to what the next node in your graph actually wants, rather than assuming everything downstream tolerates whatever rate your source happened to be recorded or exported at.
It also comes up around AudioSeparatorSimple and MIDIToAudio - models like OpenUnmix are typically trained at a specific rate, and if you feed audio recorded at something unusual (a low-bitrate voice memo at 16000 Hz, say), resampling to the rate the model actually expects before separation tends to give noticeably better stem quality than letting a mismatched rate degrade silently through the pipeline. The same logic applies in reverse: if you've separated stems or generated audio at one rate and need to hand it off to a node further downstream (or export it) at a different rate, this is the join point - do it once, deliberately, rather than letting whatever rate happens to survive the chain decide it for you.
Installing it
ComfyUI Manager: search RyanOnTheInside, install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/ryanontheinside/ComfyUI_RyanOnTheInside
cd ComfyUI_RyanOnTheInside
pip install -r requirements.txt
No model downloads - this is a straightforward scipy-flavored signal operation, and scipy is already in this pack's dependencies.
Where people get burned
Resampling down (say, to 8000 Hz) throws away high-frequency detail permanently - fine for a lightweight voice-only pass or a quick preview, bad if the result needs to actually sound good, since you can't get that detail back by resampling up again afterward. Resampling up past your source's original rate doesn't add real detail either; it just increases the data size for compatibility, it won't make a low-quality source sound better. If you hit a sample-rate mismatch error somewhere in an audio pipeline - a genuinely common gotcha whenever multiple audio-processing nodes and models are chained together - this is the node to fix it with, not AudioTimeStretch or AudioPitchShift, which solve a different problem entirely.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| audio | AUDIO | Input audio to be processed | |
| new_sample_rate | INT | 441008000β192000 | Desired new sample rate (8000 to 192000 Hz) |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| AUDIO | AUDIO | β |