Audio Slice Selector
Grab One Audio Slice Out of a List, Sans Pain
- audio_list
- audio
ComfyUI's audio story is finally real, but it's clunky about lists. When another node hands you a list of audio clips - say, a sliced-up voiceover or a batch of music stems - there's no clean built-in way to just grab clip number 3 and feed it somewhere else. AudioSliceSelector is the tiny utility that fixes that: feed it an audio list, set an index, get one clip back.
It ships in AnotherUtils (marcoc2/ComfyUI-AnotherUtils), marcoags' grab-bag pack, and it's about as minimal as a node can be. One input list, one output clip, a clamp instead of a crash. This is the kind of node that's useless until the exact moment you need it, and then it's the only thing that works.
How it works
The node runs with INPUT_IS_LIST = True, which means ComfyUI hands it the entire audio list as one argument. It then picks the clip at your index and returns it. The one bit of engineering worth knowing: the index is clamped to the list bounds. Ask for clip 5 in a 3-clip list and you get clip 3 (the last one) rather than an error. That's a deliberate choice - in a generated audio pipeline, indexes shift around as slicing changes, and a crash on every off-by-one would be miserable.
The inputs
Only two, and only one of them is interesting:
audio_list- anAUDIOlist input. The natural upstream is AudioWaveformSlicer (same pack), which outputs a list of slices; this node is the partner that pulls individual slices back out.index- which clip you want, 0-based. Defaults to 0. The silent clamping is the gotcha to remember.
What comes out
A single audio clip (one AUDIO tensor, with its sample_rate intact). Feed it to a save-audio node, an audio-conditioned video model, or AudioConcatenate (also in this pack) if you want to reorder slices and stitch them in a new order. Reorder-and-stitch is actually the killer workflow here: slice a long track, select slices in a new sequence, concatenate - that's a poor-man's 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. No models, no dependencies.
Where people get burned
The clamp is the only real trap, and it's a sneaky one: it silently succeeds with the wrong clip. If your audio sounds like it's picking the wrong segment, check whether your index is within bounds - the node will happily return the last slice for an out-of-range index and nothing will tell you. Also worth knowing: this node expects an actual list, not a stacked batch. If you wired up a node that outputs a single batched AUDIO tensor and this one complains, you're missing the list-conversion step upstream.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| audio_list | AUDIO | — | |
| index | INT | 00–999 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| audio | AUDIO | — |