[−][src]Struct alass_util::VoiceActivity
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 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.
Trait Implementations
impl<'_> From<&'_ VoiceActivity> for TimeSpans
[src]
Analyze vector of voice-activity data and produce TimeSpans
fn from(activity: &VoiceActivity) -> TimeSpans
[src]
Auto Trait Implementations
impl RefUnwindSafe for VoiceActivity
impl Send for VoiceActivity
impl Sync for VoiceActivity
impl Unpin for VoiceActivity
impl UnwindSafe for VoiceActivity
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,