Skip to content

Teach Rust to listen.

Run small wake-word models locally, from a microphone or any 16 kHz PCM stream. No cloud. No audio uploads.
listener.rs
listening on Default Microphone
detectedhey foxy92.4%
local by defaultstreaming detectiontwo APIs high + low level

An audio stream

Detector takes 10 ms PCM blocks from files, calls, sockets, or your own audio engine. Bring your own audio

A wake-word model

Load microWakeWord JSON directly, or describe a standalone .tflite model in Rust. Set up your model

Microphone -> Listener --+
+--> Detector --> Detection
Your audio -> PCM blocks --+

The detector converts every 10 ms audio block into microWakeWord frontend features, evaluates the TensorFlow Lite model, smooths recent probabilities, and reports a match when the configured cutoff is reached.

Terminal window
cargo add micro-wakeword
use micro_wakeword::Listener;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut listener = Listener::from_config("wake-word.json")?;
while let Some(hit) = listener.next_detection()? {
println!("Heard {} ({:.1}%)", hit.wake_word, hit.probability * 100.0);
}
Ok(())
}

Keep the model JSON and .tflite file together. That is enough to start listening.