Nodes/Audio General/Audio Trim Silence (Voice Activity)
ComfyUI Node

Audio Trim Silence (Voice Activity)

Trim silence from audio using torchaudio's Voice Activity Detector. Lower lp_filter_freq if you have high frequency background noise.

By niknah·Created about a year ago·Updated 19 days ago· 4
Audio Trim Silence (Voice Activity)
  • audio
  • audio
trigger_level7.00
trigger_time0.25
search_time1.0
allowed_gap0.25
pre_trigger_time0.00
boot_time0.35
noise_up_time0.10
noise_down_time0.010
noise_reduction_amount1.35
measure_freq20.0
measure_smooth_time0.40
hp_filter_freq50
lp_filter_freq6000
hp_lifter_freq150
lp_lifter_freq2000
CategoryAudio

Inputs (16)

NameTypeDefaultDescription
audioAUDIO
trigger_leveloptFLOAT7.00The 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_timeoptFLOAT0.25The time constant (in seconds) used to help ignore short bursts of sound. (Default: 0.25)
search_timeoptFLOAT1.0The 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_gapoptFLOAT0.25The allowed gap (in seconds) between quieter/shorter bursts of audio to include prior to the detected trigger point. (Default: 0.25)
pre_trigger_timeoptFLOAT0.00The amount of audio (in seconds) to preserve before the trigger point and any found quieter/shorter bursts. (Default: 0.0)
boot_timeoptFLOAT0.35estimation/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_timeoptFLOAT0.10for when the noise level is increasing. (Default: 0.1)
noise_down_timeoptFLOAT0.010for when the noise level is decreasing. (Default: 0.01)
noise_reduction_amountoptFLOAT1.35the detection algorithm (e.g. 0, 0.5, …). (Default: 1.35)
measure_freqoptFLOAT20.0processing/measurements. (Default: 20.0)
measure_smooth_timeoptFLOAT0.40spectral measurements. (Default: 0.4)
hp_filter_freqoptFLOAT50
lp_filter_freqoptFLOAT6000Put this number down if there is high frequency background noise.
hp_lifter_freqoptFLOAT150
lp_lifter_freqoptFLOAT2000

Outputs (1)

NameTypeDescription
audioAUDIO