pub struct PreparedMicrophone<V = SileroVad> { /* private fields */ }Available on crate feature
microphone and non-target_family=wasm only.Expand description
A microphone whose fallible setup is done. Opening it starts the worker thread, which opens the input device.
Implementations§
Source§impl<V: VoiceActivityDetector + Send + 'static> PreparedMicrophone<V>
impl<V: VoiceActivityDetector + Send + 'static> PreparedMicrophone<V>
pub fn open(self) -> Result<Microphone, CaptureError>
pub fn open_with_wake_word<W>(
self,
detector: W,
) -> Result<(Microphone, WakeWordMonitor), CaptureError>where
W: WakeWordDetector + Send + 'static,
Auto Trait Implementations§
impl<V> Freeze for PreparedMicrophone<V>where
V: Freeze,
impl<V> RefUnwindSafe for PreparedMicrophone<V>where
V: RefUnwindSafe,
impl<V> Send for PreparedMicrophone<V>where
V: Send,
impl<V> Sync for PreparedMicrophone<V>where
V: Sync,
impl<V> Unpin for PreparedMicrophone<V>where
V: Unpin,
impl<V> UnsafeUnpin for PreparedMicrophone<V>where
V: UnsafeUnpin,
impl<V> UnwindSafe for PreparedMicrophone<V>where
V: UnwindSafe,
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