[][src]Struct alass_util::VoiceActivity

pub struct VoiceActivity {
    pub data: Vec<bool>,
    pub chunk_millis: u64,
}

Voice activity as computed by webrtc-vad

Fields

data: Vec<bool>chunk_millis: u64

Methods

impl VoiceActivity[src]

pub fn clean(&self, opening_radius: usize, closing_radius: usize) -> Self[src]

Cleans voice-activity data (EXPERIMENTAL)

This operation successively employs the mathematical morphological 'erosion' and 'dilationoperators to clean the output of the voice-activity detector. The result is a clone of the originalVoiceActivity` 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.

Trait Implementations

impl<'_> From<&'_ VoiceActivity> for TimeSpans[src]

Analyze vector of voice-activity data and produce TimeSpans

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.