Audio Waveform Slicer
Cut Audio at Exact Timestamps Into Slices You Can Reuse
- audio_slices
If you're building audio-synced video, you eventually need to slice audio - separate a voiceover into individual lines, isolate a beat, cut a long track into chunks that each get their own video segment. AudioWaveformSlicer does that in pure ComfyUI: pick an audio file from your input folder, type the cut times in seconds as a JSON list, and get back a list of audio slices with their sample rates intact. It's the sharp knife of the pack's audio trio (slice → select → concatenate).
It's from AnotherUtils (marcoc2/ComfyUI-AnotherUtils), and it's one of the few nodes in the pack with a real external dependency: it decodes audio with PyAV (av), not ffmpeg on the command line. If you already have PyAV installed - very likely, since many video nodes depend on it - you're done; if not, pip install av.
How it works
You select the file from a dropdown (populated from ComfyUI's input directory, filtered to audio/video files) and provide cut_positions as a JSON array of seconds, e.g. [1.5, 4.0, 7.2]. The node decodes the whole file to a waveform tensor, converts each timestamp to sample indices (seconds × sample_rate), validates them, and builds slice boundaries: [0] + cuts + [total]. Each gap becomes its own AUDIO slice with the original sample rate preserved. Empty or invalid timestamps get skipped, and if nothing valid is left it returns the whole file as one slice rather than erroring - a forgiving default for a fiddly input.
The inputs
audio- a file dropdown, not an AUDIO tensor wire. Files must be in ComfyUI'sinputdirectory. This trips people up: you're picking a filename, not connecting an audio node.cut_positions- the JSON list of cut points in seconds. The boundary between "the times to cut" and "the resulting slice count" is worth internalizing: N cut positions produce N+1 slices.
What comes out
A list of audio_slices (type AUDIO, output marked as a list). Each slice is a standard ComfyUI AUDIO dict - {waveform, sample_rate} - so it plugs into audio save nodes and any audio-aware video model. Pair the list with AudioSliceSelector (pick one slice by index) or AudioConcatenate (reorder and stitch) and you've got a working audio editor inside ComfyUI.
Installing it
Standard AnotherUtils install:
cd ComfyUI/custom_nodes
git clone https://github.com/marcoc2/ComfyUI-AnotherUtils.git
Restart ComfyUI, or search "AnotherUtils" in ComfyUI Manager. Then, if it isn't already present in your environment:
pip install av
Where people get burned
The two most common mistakes are the file dropdown (expecting a wire, but it's a file picker) and cut positions outside the file's duration - those get silently dropped, which can leave you with fewer slices than you expected, so watch the list length. Also note the timestamps are in seconds, not frames or samples: [1.5, 4.0] means "cut at 1.5s and 4.0s." And because the node decodes the full file into memory on every run, very long audio (an hour-long podcast) is heavy - fine occasionally, wasteful if you're iterating. Slice a short representative clip while you're tuning, then run the full thing when you're confident.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| audio | COMBO | 0 options: | |
| cut_positions | STRING | [] | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| audio_slices | AUDIO | — |