pub struct VoiceActivityDetector { /* private fields */ }Expand description
Voice Activity Detector with adaptive noise floor.
Implementations§
Source§impl VoiceActivityDetector
impl VoiceActivityDetector
Sourcepub fn is_speaking(&self) -> bool
pub fn is_speaking(&self) -> bool
Whether speech is currently detected (Speech or Hangover state).
Sourcepub fn noise_floor_db(&self) -> f64
pub fn noise_floor_db(&self) -> f64
Current noise floor estimate (dBFS).
Sourcepub fn is_wavekat_backed(&self) -> bool
pub fn is_wavekat_backed(&self) -> bool
Whether this detector is currently using the WaveKat backend.
Sourcepub fn backend_name(&self) -> &'static str
pub fn backend_name(&self) -> &'static str
Name of the active backend.
Sourcepub fn last_probability(&self) -> Option<f32>
pub fn last_probability(&self) -> Option<f32>
Last normalized speech probability or binary backend decision.
Sourcepub fn drain_pre_speech(&mut self) -> Vec<Vec<i16>>
pub fn drain_pre_speech(&mut self) -> Vec<Vec<i16>>
Get pre-speech frames (the frames captured just before speech onset).
Sourcepub fn process_frame(&mut self, samples: &[i16]) -> Option<VadEvent>
pub fn process_frame(&mut self, samples: &[i16]) -> Option<VadEvent>
Process a single audio frame and return any state-change event.
Auto Trait Implementations§
impl Freeze for VoiceActivityDetector
impl RefUnwindSafe for VoiceActivityDetector
impl Send for VoiceActivityDetector
impl !Sync for VoiceActivityDetector
impl Unpin for VoiceActivityDetector
impl UnwindSafe for VoiceActivityDetector
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more