Lightweight Keyword Spotting with Classical DSP
Can a 30-number fingerprint and a support vector machine hear “yes”, “no”, “stop” and “go”? Mostly, and it shows exactly where it gets confused.
84.67%
test accuracy, 5 classes
30
features per clip
99.5%
silence recall
>50%
accuracy down to 10 dB SNR
Keyword spotting is the always-on wake-word problem: a small device has to pick a few command words out of everything else it hears, on a tight compute budget. Deep networks win the benchmarks but cost memory and power. This project asked how far classical signal processing and a kernel classifier can go, small enough for embedded or system-on-chip use.
How it works
- step 1Data
Data
Google Speech Commands v2, five classes: yes, no, stop, go and silence. Clips resampled to 16 kHz, trimmed, normalized and fixed to one second.
- step 2Features
Features
20–25 ms Hamming windows with a 10 ms hop. Short-time energy, zero-crossing rate and 13 MFCCs, each summarized by its mean and standard deviation: a 30-dimensional vector per clip.
- step 3Models
Models
k-NN (k = 1, 3, 5, 7) against an RBF-kernel SVM with a grid search over kernel scale and the box constraint C, tuned on a validation split and scored once on a held-out test set.
- step 4Stress test
Stress test
White noise and real background noise mixed in at 20, 10, 5, 0 and −5 dB signal-to-noise ratio.
What it found
01
The SVM on MFCC + energy + ZCR reached 84.67% test accuracy, clearing the project's 75% target.
02
Silence is almost never missed (99.5% recall). The main confusion is “no” versus “go”: 68 “no” clips were heard as “go” and 63 the other way round.
03
Accuracy degrades gracefully: about 69% at 20 dB and still above 50% at 10 dB for both noise types. Real background noise hurt less than white noise at low SNR.
the takeaway
“Hand-crafted features plus a well-tuned kernel get most of the way for a small vocabulary, and the remaining errors are acoustically honest ones.”
/tools
- MATLAB
- Python
- librosa
- scikit-learn
- NumPy
- SVM
- k-NN
- MFCC / STFT
next case file

