ComfyUI Node

Cut Audio

Remove a section of audio and close the gap

By kale4eat·Created 2 years ago·Updated about a year ago· 23
Cut Audio
  • audio
  • audio
start_second0.000
end_second0.000

The other half of the Trim/Cut pair in this pack - same three inputs as SDT_TrimAudio, but going by standard audio-editor convention, it does the opposite job: instead of keeping only what's between your two timestamps, it removes that section and joins the audio on either side of it back together. Reach for this when you want to delete a chunk out of the middle of a clip - cutting out a cough, a stray noise, dead air in the middle of a recording - rather than crop down to a single window.

How it works

It removes the range between start_second and end_second from the waveform and splices what's left into a single continuous clip. Functionally the inverse of SDT_TrimAudio, which keeps that range and discards everything else - the two nodes share an identical schema, which is the tell that they're a deliberate pair rather than two unrelated tools.

The inputs and outputs that matter

  • audio - the clip to cut from, required.
  • start_second and end_second (both default 0, step 0.001) - the range to remove, millisecond precision.
  • audio (output) - the clip with that range excised and the remainder joined.

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 beyond the pack's standard torchaudio requirement.

Common issues & troubleshooting

Got the crop instead of the removal (or vice versa). This is the single most likely mistake with this node - grab SDT_TrimAudio if you actually wanted to keep the window between your two timestamps, and this one only if you want that window gone.

Audible click or discontinuity at the cut point. This is a straight splice, not a crossfade - cutting mid-waveform (rather than at a genuine silence or zero-crossing) can produce an audible pop where the two remaining halves meet. If clicks are a problem, cut at a point you've confirmed is quiet (check with SDT_PlayAudio first) rather than an arbitrary timestamp.

Cutting based on Whisper segment timestamps and the boundary feels imprecise. Same caveat as trimming: Whisper-family timestamps aren't sample-exact, so a cut placed right at a raw segment boundary can clip the tail or head of adjacent words. Pad your cut range slightly if precision at the edges matters.

Not sure whether you want this node or SDT_TrimAudio. A quick way to decide: if you'd describe what you want as "just the bit from X to Y," that's Trim. If you'd describe it as "everything except the bit from X to Y," that's Cut. They're mirror images of the same three inputs, so the only real risk is grabbing the wrong one out of habit and getting a result that's technically valid audio but not remotely what you meant to produce.

Categoryspeech-dataset-toolkit/edit

Inputs (3)

NameTypeDefaultDescription
audioAUDIO
start_secondFLOAT0.000
end_secondFLOAT0.000

Outputs (1)

NameTypeDescription
audioAUDIO