XB-BOX - 🎵 音频切片V3(高级)
The audio slicer for when two voices actually talk over each other
- combined_audio
- total_frames
- fps
- audio1
- frames1
- audio2
- frames2
V2 handles clean A-then-B dialogue, but real conversations are messier: someone cuts in, a line has a word you want muted, or two people talk over each other. XB_AudioSlicerV3 is the "高级" (advanced) two-track slicer that adds the two things V2 lacks - mute regions inside each clip and an overlap merge mode - so you can build the kind of layered dialogue track a natural conversation needs.
It's the most capable node in XB_ToolBox's audio-slicer family, and also the one with the most moving parts. If your scene is two clean sequential lines, V2 is simpler and does the job. If you need surgical control over what's audible, this is it.
How it works
Both tracks go through the same pipeline as the rest of the family: decode from ComfyUI/input, mono downmix, time-clamp, and the ever-important 4N+1 frame snap so the output stays aligned to what video models expect. On top of that:
- Mute regions. For each track you set
mute_countand then amutesN_datastring like2.5,3.8;5.0,5.6- semicolon-separated start/end pairs in seconds. Those sections are zeroed out (silenced) in the slice. This is how you cut a cough out of a line without re-editing the file, or create a pause inside speech. - Two merge modes.
接力(relay) concatenates A then B, like V2.重叠(overlap) actually mixes the tracks so both can be heard at once - the interjection case. - Per-track outputs. You get the combined track and each speaker's slice separately, each with its own frame count.
One detail the source is careful about: mute times are interpreted relative to the original file's timeline and then shifted into the slice, so a mute of 10.0,10.5 in a file cut from 8s to 12s mutes 2–2.5s of the output. Confusing until you know it - the node deliberately subtracts the cut's start offset for you.
The inputs that matter
- audio1 / audio2, start1/end1, start2/end2 - the two files and their cuts.
- mute_count1 / mute_count2 (0–20) and mutes1_data / mutes2_data - number and definition of the silent regions. Format:
start,end;start,endin seconds. - merge_mode -
接力(relay, default) or重叠(overlap/mix). - fps - default 24 here (note: the base and V1/V2 default to 25). Set it to match your pipeline.
Outputs: combined_audio, total_frames (INT, the thing to feed segment_length), fps, plus audio1/frames1 and audio2/frames2.
Installing
Same pack, same story: ComfyUI Manager → search XB_ToolBox, or
cd ComfyUI/custom_nodes
git clone https://github.com/WJLUOXIAO/XB_ToolBox.git
then restart. Needs av (PyAV) for decoding, listed in requirements.txt.
Common issues
- Mutes not applying - check the format: commas between start/end, semicolons between regions, no stray spaces. A bad region is silently skipped.
- Muted the wrong part - remember mute times are absolute to the source file, then offset into the slice. If you cut from 8s, a mute written as
8.0,8.5is silence at the very start of the clip. - Overlap mode sounds clipped - two mono tracks mixed can peak; it's a mix, not a mastered stem, so don't expect dynamic range management.
If all this is more firepower than you need, V2's relay mode with a gap_frames pause is the lighter option for plain two-line dialogue.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| audio1 | COMBO | 1 options: none | |
| fps | FLOAT | 241–120 | — |
| start1 | FLOAT | 0.000–3600 | — |
| end1 | FLOAT | 10.000–3600 | — |
| mute_count1 | INT | 00–20 | — |
| mutes1_data | STRING | — | |
| audio2 | COMBO | 1 options: none | |
| start2 | FLOAT | 0.000–3600 | — |
| end2 | FLOAT | 10.000–3600 | — |
| mute_count2 | INT | 00–20 | — |
| mutes2_data | STRING | — | |
| merge_mode | COMBO | 接力 | 2 options: 接力, 重叠 |
| total_display | STRING | 0 / 0帧 | — |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| combined_audio | AUDIO | — |
| total_frames | INT | — |
| fps | FLOAT | — |
| audio1 | AUDIO | — |
| frames1 | INT | — |
| audio2 | AUDIO | — |
| frames2 | INT | — |