Keyword Spotting (KWS)
The Keyword Spotting (KWS) module in soundKIT enables accurate detection of predefined spoken keywords in diverse and noisy conditions. It is designed for real-time, low-power deployments using embedded platforms.
It supports:
- ✅ Data preparation
- ✅ Model training
- ✅ Evaluation
- ✅ Model export
- ✅ PC/EVB-based demo inference
Engineered for deployment on Ambiq's ultra-low power SoCs, KWS offers high accuracy even in constrained edge environments.
📘 Try it now: Explore the KWS Tutorial Notebook to get started.
Features
- Keyword spotting with frame-level granularity
- CRNN-based acoustic modeling
- Support for long audio (15s) with extension frames
- TFLite and C-array export for embedded use
- PC-based and EVB-based real-time demos
Install soundKIT
Refer to the QuickStart Guide for installation and setup instructions.
KWS Task Modes
Use the soundkit CLI to run KWS tasks through different modes using a configuration file like kws.yaml.
kws.yaml
name: galaxy
project: kws
job_dir: ./soundkit/tasks/${project}
...
KWS Task Mode Overview
Prepares training and validation samples by injecting keywords into a diverse background of speech and noise at different SNR levels.
soundkit -t kws -m data -c configs/kws/kws.yaml
See Data for dataset setup details.
Trains a keyword spotting model with CRNN architecture, focal loss, and SNR-augmented training.
soundkit -t kws -m train -c configs/kws/kws.yaml
Optional: run TensorBoard for live monitoring:
soundkit -t kws -m train --tensorboard -c configs/kws/kws.yaml
See Train for training methodology.
Evaluates model performance on sample audio files, producing keyword activity predictions.
soundkit -t kws -m evaluate -c configs/kws/kws.yaml
See Evaluate for usage details.
Converts the trained model into TFLite and C-format for deployment on Ambiq EVB or other embedded targets.
soundkit -t kws -m export -c configs/kws/kws.yaml
See Export for model format options.
Test the model in real-time either using PC or EVB hardware. We suggest to run on your PC first and try on EVB later:
soundkit -t kws -m demo -c configs/kws/kws.yaml demo.platform=pc
# or
soundkit -t kws -m demo -c configs/kws/kws.yaml demo.platform=evb
See Demo to test live detection.