Music - Audio Trimmer
A Validated Time-Range Trimmer
- audio
- AUDIO
Every audio pipeline ends up wanting a slice of the audio it started with - the usable two minutes of a five-minute TTS take, the chorus of a song, the section of a recording that survived the noise gate. Music - Audio Trimmer from ComfyUI MusicTools is that slice: it extracts a validated time range from an AUDIO input and outputs the trimmed AUDIO.
The two inputs
start_time(FLOAT, 0–3600 s, default 0) - where to start the cut.end_time(FLOAT, 0–3600 s, default 10) - where to end it.
That's the whole interface. Set a range in seconds, get the clip. Batch layout and channel count are preserved, so trimming a batch of audio trims every item consistently - which matters more than it sounds if you're processing a folder of takes that all need the same dead air removed.
The "validated" part is the point
The description leans on "validated" for a reason: the node checks that your range is actually sane before it cuts. end_time must be greater than start_time, and both must be within the audio's length - the node won't silently hand you a truncated or inverted slice. For a graph-driven tool, that's a small but real kindness: it fails loudly with a clear error instead of producing audio you'll spend ten minutes debugging.
How to actually use it
The practical workflow is listen, then trim. Load your audio, find the usable section (a TTS take often has "um" at the start and dead air at the end), then set:
Load Audio -> Audio Trimmer (start: 2.5, end: 95) -> Noise Remove -> Music Fix -> Save Audio
Trim before you process, not after. Every node downstream - denoise, compression, LUFS normalization - estimates stuff from your audio (noise profiles, integrated loudness, dynamics), and if the section you don't want is still in there, it pollutes those estimates. Cut the dead air first and every subsequent node behaves better. This is the single biggest quality lever in the whole pack for TTS cleanup, and it's free.
For music, it's the loop-and-arrange move: extract a section, then feed it to the rest of the chain. And because the output is plain AUDIO, a trimmer can also act as your "get this under 30 seconds for a preview render" tool.
The honest take
This is a true utility - no processing, no flavor, one job, done. The "validated" behavior is its personality, and the batch/channel preservation is the quietly important part. The only real trap is the same one every time-based tool has: you're entering seconds, not frames or bars, so double-check your numbers if the source has a weird sample rate or a long intro. When in doubt, use end_time a hair longer than you think you need - trimming is easy to redo, and re-adding audio you cut isn't.
Install
Standard pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/jeankassio/ComfyUI_MusicTools.git
cd ComfyUI_MusicTools
python -m pip install -r requirements.txt
Restart, find it under music. A simple array slice with validation - no models, no GPU, instant even on long files.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| audio | AUDIO | — | |
| start_time | FLOAT | 0.00–3600 | — |
| end_time | FLOAT | 10.00–3600 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| AUDIO | AUDIO | — |