pub struct WakeDaemon { /* private fields */ }Expand description
Daemon that runs wake word detection in the background.
When the wake word is detected, the daemon can activate Talk Mode.
The daemon runs until cancelled via its CancellationToken.
Implementations§
Source§impl WakeDaemon
impl WakeDaemon
Sourcepub fn new(config: WakeWordConfig) -> Result<Self, PluginError>
pub fn new(config: WakeWordConfig) -> Result<Self, PluginError>
Create a new wake daemon with the given configuration.
Sourcepub async fn run(
&mut self,
cancel: CancellationToken,
) -> Result<(), PluginError>
pub async fn run( &mut self, cancel: CancellationToken, ) -> Result<(), PluginError>
Run the daemon until cancelled.
STUB: Logs that the daemon is running and waits for cancellation. Real implementation will continuously capture audio and feed it to the wake word detector.
Sourcepub fn detector(&self) -> &WakeWordDetector
pub fn detector(&self) -> &WakeWordDetector
Get a reference to the underlying detector.
Auto Trait Implementations§
impl Freeze for WakeDaemon
impl RefUnwindSafe for WakeDaemon
impl Send for WakeDaemon
impl Sync for WakeDaemon
impl Unpin for WakeDaemon
impl UnsafeUnpin for WakeDaemon
impl UnwindSafe for WakeDaemon
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