A classic TinyML project: extract MFCC or mel features, run a small CNN, and deploy int8 on a microcontroller. It teaches the memory budget and latency on real hardware.
Keyword spotting on a microcontroller
A small model that recognises two or three keywords on a microcontroller with a microphone, int8 quantized.
Educational draft content that needs expert review before it is used as an academic reference. Specifications, versions and licences change; check the official source. No experimental result is shown here unless it was actually run.
Hardware
- Arduino Nano 33 BLE Sense (built-in microphone)
- Or ESP32-S3 with an I2S microphone
Software
- TensorFlow Lite for Microcontrollers
- CMSIS-NN
- Python
Architecture
Microphone → 1-second window → mel features → small int8 CNN → word probabilities + an "other" class.
Suggested datasets (check their licences)
- Speech Commands (check the licence)
- Your own recordings with the speakers' consent
Implementation steps
- Collect balanced data with a noise class and an "other" class
- Train a small CNN and measure it on a separate test set
- Quantize to int8 with a representative set
- Convert to a C array and embed it
- Measure memory and latency on the device
Expected deliverables
A microcontroller program that lights an indicator when it hears a word, with a memory and latency report.
Evaluation metrics
- Precision and recall per class
- False alarms per hour
- Memory use and latency
Limits
- Sensitive to noise and accents
- Ready-made datasets may not represent your environment
Ideas to extend
- Add a VAD before the model to save power
- Try Arabic words
- Compare with Edge Impulse
Do not record other people without their consent; do not store raw recordings unless necessary.
Related technologies
Image and audio processing in the experiments runs inside your browser. Your images and audio are never uploaded and conversations are not stored. Privacy
