pub struct VadDetector { /* private fields */ }Expand description
Real-time voice activity detector combining energy and spectral flux metrics.
Implementations§
Source§impl VadDetector
impl VadDetector
Sourcepub fn new(
config: VadConfig,
metrics: Arc<dyn VadMetricsCollector>,
) -> Result<Self>
pub fn new( config: VadConfig, metrics: Arc<dyn VadMetricsCollector>, ) -> Result<Self>
Construct a new detector instance.
Sourcepub fn active_segment_start_sample(&self) -> Option<usize>
pub fn active_segment_start_sample(&self) -> Option<usize>
Return the start sample of the currently active speech segment, if any.
Sourcepub fn reset(&mut self, stream_start_time: AudioTimestamp)
pub fn reset(&mut self, stream_start_time: AudioTimestamp)
Reset processed sample count and stream start time.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for VadDetector
impl !RefUnwindSafe for VadDetector
impl Send for VadDetector
impl Sync for VadDetector
impl Unpin for VadDetector
impl UnsafeUnpin for VadDetector
impl !UnwindSafe for VadDetector
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