Audio Trim Silence (Voice Activity)
Trim the dead air off both ends of a voiceover (Audio Trim Silence VAD)
- audio
- audio
TTS and voiceover recordings almost always ship with a second or two of dead air on the front, and often a trailing tail of room noise after the last word. Audio Trim Silence (Voice Activity) is the smarter of Audio General's two silence trimmers: it uses torchaudio's voice activity detector to find where speech actually starts, then trims both ends so your clip snaps tight around the talking. It's from niknah's audio-general-ComfyUI pack, it takes one AUDIO in and puts one AUDIO out, and if you do any narration-adjacent work it'll quietly save you from the most annoying manual edit in ComfyUI.
How it works
The node calls torchaudio.functional.vad, which is a spectral voice detector - it tracks the noise floor, watches for the signal level to rise past a trigger, and reports where real activity begins. The clever bit: vad only detects the start of speech, so it would leave the tail alone. Audio Trim Silence VAD runs it forward, flips the waveform, runs it again, and flips back - which is how the trailing silence gets trimmed too. Trimming is from the ends only; it will not remove the pauses between sentences inside the clip.
The knobs that matter
The schema lists a wall of parameters, and here's the thing: almost all of them are passed straight through to torchaudio's vad. The defaults are sensible, so a beginner should touch maybe three:
trigger_level(default 7) - how much the signal must rise above the noise floor to count as speech. Noisy input eating your first word? Raise it. Quiet speech getting chopped? Lower it.pre_trigger_time(default 0) - seconds of audio to preserve before the detected speech starts. Set it to 0.1–0.3 to stop your voiceovers from sounding like they begin mid-attack.lp_filter_freq(default 6000) - and the author's own tip is right here in the node description: lower this if you have high-frequency background noise (hiss, air conditioning), so the detector stops treating it as signal.
Everything else - trigger_time, search_time, noise_up_time, the lifter frequencies - are fine at their defaults. Tweak them only if you're chasing a specific failure.
Install
The whole pack installs at once. ComfyUI Manager → search "Audio General" → install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/niknah/audio-general-ComfyUI
Restart ComfyUI. Dependencies are torchaudio, librosa, torch-time-stretch, audiostretchy - no model downloads, CPU-only.
Where people get burned
Two things. First, VAD is tuned for speech - feed it a music bed or a clip with weird foley and it can cut in odd places. For plain speech it's the right tool. Second, remember it only trims the ends, not internal gaps. People expect it to tighten up every pause in a narration and it won't - if you want the audio to snap from word to word, that's an editor's job or a different approach. And if the VAD keeps grabbing a loud room-tone hum, that's your cue to drop lp_filter_freq before you touch trigger_level. The pack's other trimmer, Audio Trim Silence (dB), is the simpler, faster, music-friendlier alternative if this one ever feels like too many dials.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| audio | AUDIO | — | |
| trigger_levelopt | FLOAT | 7.00 | The measurement level used to trigger activity detection. This may need to be cahnged depending on the noise level, signal level, and other characteristics of the input audio. (Default: 7.0) |
| trigger_timeopt | FLOAT | 0.25 | The time constant (in seconds) used to help ignore short bursts of sound. (Default: 0.25) |
| search_timeopt | FLOAT | 1.0 | The amount of audio (in seconds) to search for quieter/shorter bursts of audio to include prior to the detected trigger point. (Default: 1.0) |
| allowed_gapopt | FLOAT | 0.25 | The allowed gap (in seconds) between quieter/shorter bursts of audio to include prior to the detected trigger point. (Default: 0.25) |
| pre_trigger_timeopt | FLOAT | 0.00 | The amount of audio (in seconds) to preserve before the trigger point and any found quieter/shorter bursts. (Default: 0.0) |
| boot_timeopt | FLOAT | 0.35 | estimation/reduction in order to detect the start of the wanted audio. This option sets the time for the initial noise estimate. (Default: 0.35) |
| noise_up_timeopt | FLOAT | 0.10 | for when the noise level is increasing. (Default: 0.1) |
| noise_down_timeopt | FLOAT | 0.010 | for when the noise level is decreasing. (Default: 0.01) |
| noise_reduction_amountopt | FLOAT | 1.35 | the detection algorithm (e.g. 0, 0.5, …). (Default: 1.35) |
| measure_freqopt | FLOAT | 20.0 | processing/measurements. (Default: 20.0) |
| measure_smooth_timeopt | FLOAT | 0.40 | spectral measurements. (Default: 0.4) |
| hp_filter_freqopt | FLOAT | 50 | — |
| lp_filter_freqopt | FLOAT | 6000 | Put this number down if there is high frequency background noise. |
| hp_lifter_freqopt | FLOAT | 150 | — |
| lp_lifter_freqopt | FLOAT | 2000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| audio | AUDIO | — |