[−][src]Function alass::alass_voice_activity_clean
#[no_mangle] pub extern "C" fn alass_voice_activity_clean(
activity: *mut VoiceActivity,
opening_radius: usize,
closing_radius: usize
) -> *mut VoiceActivity
[EXPERIMENTAL] Cleans voice-activity data
This operation successively employs mathematical morphological 'erosion'
and 'dilationoperators to clean the output of the voice-activity detector. The result is a clone of the original
VoiceActivity` instance having
cleaner/fewer timespans.
The opening_radius
and closing_radius
parameters represent the kernel radii
of the mathematical morphological operators. Each radius determines a window
of size (2r+1)*CHUNK_MILLIS
milliseconds. Any errant spans smaller than this
window will be removed and any gaps larger than this window will be filled.