ComfyUI Node

AudioCrop

Trim audio to a start and end time

By christian-byrne·Created 2 years ago·Updated 4 months ago· 591
AudioCrop
  • audio
  • AUDIO
start_time0:00
end_time1:00

AudioCrop does exactly what it says: cut an audio clip down to a specific window. No fades, no cross-processing, no options to fuss over - you give it a start time and an end time, and it hands back that slice. It's the kind of node you don't think about until you need it, and then you need it constantly.

Why you'd reach for it

It's part of the audio-separation-nodes-comfyui pack, and in practice it's the connective tissue that makes the other nodes in that pack useful. Run AudioSeparation on a full song and you get four stem tracks the length of the whole song - if you only want the vocal hook from 0:45 to 1:10, AudioCrop is how you get there without opening an external audio editor. Same story if you're prepping a clip to feed into AudioVideoCombine: your new audio track needs to match the video's length, and cropping is the quick way to trim it down before you wire it in.

It's also just handy for cutting silence off the front of a recording, isolating a single verse to check a separation result, or chopping a long generated track down to a usable loop.

How it works

Under the hood this is straightforward slicing - no time-stretching, no resampling, just "keep the audio between these two timestamps and discard the rest." The mechanism isn't the interesting part here; the interface is.

The inputs and outputs that matter

There are exactly three inputs, all required, and no optional knobs to worry about:

  • audio - the AUDIO input you're trimming.
  • start_time - a string, default "0:00".
  • end_time - a string, default "1:00".

The defaults are the tell: these are MM:SS strings, not raw seconds. "1:00" means one minute, not one second - a mistake that's easy to make once (typing "90" expecting 90 seconds instead of "1:30") and never again. If you need a sub-minute clip, "0:15" gets you 15 seconds in.

Output is a single AUDIO - the cropped clip - ready to wire into anything else in the graph that takes audio: SaveAudio, AudioCombine, AudioVideoCombine, or back into AudioSeparation if you want to re-run separation on just the trimmed section.

Installing it

Same pack, same install path as every node here. Fastest: search audio-separation-nodes-comfyui in ComfyUI Manager and install. Manually: cd ComfyUI/custom_nodes && git clone https://github.com/christian-byrne/audio-separation-nodes-comfyui, then cd into the folder and run pip install -r requirements.txt (pulls in librosa, torchaudio>=2.3.0, numpy, moviepy) before restarting ComfyUI. AudioCrop itself doesn't need any of the heavier machinery - no model download, no GPU work - but it ships in the same pack so you install the whole thing together.

Common issues

There's not much to trip over with a node this simple, and the pack's documented troubleshooting (a corrupted Demucs checkpoint download, a harmless Windows asyncio warning) applies to AudioSeparation, not this node - AudioCrop doesn't touch any model files. The one real gotcha is the time format above: if your crop looks wildly wrong (way too short or way too long), double-check you didn't pass plain seconds where the node expects MM:SS.

Categoryaudio

Inputs (3)

NameTypeDefaultDescription
audioAUDIO
start_timeSTRING0:00
end_timeSTRING1:00

Outputs (1)

NameTypeDescription
AUDIOAUDIO