← All posts

SLMs · 7 min read

Small models for sound and speech on the edge: keyword spotting, speaker labels and audio event tagging without the cloud

Not every audio task needs a big model or a server. Here's how tiny keyword spotters, open speaker diarization pipelines and compact sound classifiers work on local hardware, what the published numbers say, and where each one breaks.

Subhash Nunna ·

When people talk about small models for audio, they usually mean speech recognition and voice assistants. But a lot of useful audio work is narrower than that. Did someone say “stop”? Who was speaking between 4:10 and 4:32? Is that a dog barking, glass breaking or a machine running rough?

These questions can often be answered by models measured in kilobytes or megabytes, running on a microcontroller, a single-board computer or a laptop. Audio stays on the device, there’s no per-minute bill, and the answer arrives without a network round trip.

This post covers three of those tasks — keyword spotting, speaker diarization and audio event tagging — with the published numbers we could find, and the trade-offs that come with each. (For the full voice-agent loop, see our post on voice agents on small language models.)

The three tasks at a glance

Task Question it answers Typical hardware Example open option
Keyword spotting “Was this word or phrase said?” Microcontroller microWakeWord, small CNN/CRNN models
Speaker diarization “Who spoke when?” CPU or GPU, laptop or server pyannote Community-1
Audio event tagging “What kind of sound is this?” Phone, single-board computer YAMNet (521 classes)

They share a design pattern: a cheap model runs all the time, and anything heavier — full transcription, a cloud model, a human — only gets involved when the cheap model fires.

Keyword spotting on a microcontroller

Keyword spotting (KWS) answers a yes/no question for a small vocabulary. A wake word is the most familiar case, but the same idea covers short commands like “lights off” or “next”.

How small can it get? A July 2026 preprint by Jakub Sobczyk and Krzysztof Fonał gives a useful, recent reference point. They trained compact models for 25 Polish keywords and ran them on a Raspberry Pi Pico 2 (RP2350, 520 KB of on-chip SRAM):

Model Parameters Float32 accuracy INT8 size
BC-ResNet (reference) ~13k 97.81% 101.97 KB
DS-CNN ~25k 97.06% 46.15 KB
CRNN ~33k 96.19% 182.62 KB
CNN ~76k 88.68% 79.44 KB

Three findings are worth carrying into your own projects:

  • Quantisation isn’t free, and it doesn’t hit every model equally. BC-ResNet was the most accurate in full precision but, in the authors’ words, “the most fragile under quantization”. The CRNN became the best INT8 model at 94.28%.
  • Quantisation can be what makes a model usable at all. The DS-CNN took 1,693.7 ms per inference in Float32 — too slow for always-on use — and 311.3 ms in INT8. The authors report that all quantised models met a one-second real-time budget.
  • Lab accuracy doesn’t survive the microphone. In live tests with the on-board microphone, the authors saw “a marked degradation in recognition accuracy”, which they attribute mainly to the mismatch between training recordings and the real device.

A shipping example. ESPHome’s microWakeWord is an open-source (Apache 2.0) wake-word engine built for ESP32-class chips. Home Assistant’s June 2024 update said its second version runs on standard ESP32 chips, can listen for three wake words at once, and “performs twice as well” as version 1, especially with its voice activity detection (VAD) model turned on. The example model in ESPHome’s documentation asks for a tensor arena of just 22,860 bytes.

Its configuration shows the two knobs every keyword spotter has:

micro_wake_word:
  models:
    - model: my_wake_word.json   # your model's manifest
      probability_cutoff: 0.97   # higher = fewer false accepts, more false rejects
      sliding_window_size: 5     # smaller = lower latency, more false accepts
  vad:
    # an optional VAD model to reduce false accepts from non-speech sounds

ESPHome’s docs describe the trade-off plainly: a larger probability cutoff “reduces the number of false accepts but increases the number of false rejections”, and a smaller sliding window “lowers latency but may increase the number of false accepts”. There is no universally right setting. Measure on your device, in your room, with your users.

One more caveat from Home Assistant: it notes that “false acceptances per hour” are considered by most companies a trade secret and not published. So comparing commercial wake-word engines on that metric is hard. Plan to measure it yourself, by leaving the device running against hours of ordinary background audio and counting false triggers.

Speaker diarization: who spoke when

Diarization splits a recording into segments and labels each with a speaker (“SPEAKER_00”, “SPEAKER_01”…). It doesn’t know names — it knows that two segments sound like the same person. That’s what you need for meeting notes, interview transcripts or call analytics.

The open baseline. pyannote’s Community-1 pipeline, released under CC-BY-4.0 (its benchmark table was last updated in September 2025), combines three published pieces: a segmentation model, WeSpeaker speaker embeddings and VBx clustering. It takes 16 kHz mono audio, runs on CPU by default, and works offline once downloaded.

from pyannote.audio import Pipeline

pipeline = Pipeline.from_pretrained("pyannote/speaker-diarization-community-1")
output = pipeline("meeting.wav", min_speakers=2, max_speakers=5)

for turn, speaker in output.exclusive_speaker_diarization:
    print(f"{turn.start:.1f}s–{turn.end:.1f}s {speaker}")

The exclusive_speaker_diarization output gives one speaker at a time, which makes it much easier to line up with a transcript from a speech-to-text model.

What the error rates look like. pyannote reports diarization error rate (DER) with no forgiveness collar and without skipping overlapping speech, which is a strict setting:

Dataset Community-1 DER
VoxConverse v0.3 11.2%
AISHELL-4 11.7%
AMI (headset mics) 17.0%
AMI (single distant mic) 19.9%
DIHARD 3 (full) 20.2%
CALLHOME (part 2) 26.7%
Ego4D (dev) 46.8%

The spread is the lesson. The same model ranges from about 11% to nearly 47% depending on the audio. Close microphones and clean turn-taking go well. Distant mics, phone audio and wearable-camera recordings are much harder. The same card shows pyannote’s paid hosted model doing better on every dataset in the table, so diarization quality is still an area where bigger models pay.

Practical tips:

  • If you know the number of speakers, pass it (num_speakers=2). It removes a whole class of error.
  • Run diarization and transcription separately, then merge on timestamps.
  • Evaluate on recordings that look like yours. A score on AMI says little about a noisy factory floor.

Audio event tagging: what is that sound?

Audio event tagging labels non-speech sounds: alarms, engines, animals, footsteps, breaking glass. The standard starting point is Google’s YAMNet.

According to its README, YAMNet uses a MobileNet v1 architecture with 3.7 million weights and 69.2 million multiplies per 0.96-second frame. It predicts 521 classes from the AudioSet ontology. Input is 16 kHz mono audio, turned into 64-band log-mel patches; outputs are per-class scores, so one clip can carry several labels. On the AudioSet evaluation set, the README reports a balanced mean average precision of 0.306 — a reminder that 521-way tagging of messy YouTube audio is hard.

How well does it work off the shelf? One developer ran the TFLite version of YAMNet over all 2,000 clips of the ESC-50 environmental-sound dataset, mapping YAMNet’s labels to ESC-50’s 50 classes by hand, with no training. The results:

  • 60.45% top-1 and 85.45% top-5 across all clips.
  • Distinctive sounds worked well: church bells 100%, dog 97.5%, keyboard typing 97.5%.
  • Near-neighbours failed: hen was confused with rooster, snoring with breathing, mouse clicks with keyboard typing, and sirens with clock alarms.

That pattern is typical. A general tagger is good at telling broad categories apart and weak at fine distinctions it was never asked to make. If your product cares about one specific sound — a particular machine fault, say — use YAMNet’s 1,024-dimensional embeddings as features and train a small classifier on your own labelled recordings, rather than relying on its built-in labels.

Trade-offs to plan for

  • Accuracy vs. always-on cost. Smaller and quantised models save memory and power but can lose accuracy unevenly. Test the INT8 model, not just the float one.
  • False accepts vs. false rejects. Every threshold moves errors from one side to the other. Decide which error is worse for your users before you tune.
  • Lab audio vs. your microphone. Every source above points to domain mismatch, whether it’s a different mic, a distant speaker or background noise. Collect real recordings from the target device early.
  • Privacy is a design choice, not a given. Running locally only helps if audio stays local after the trigger. Be explicit about what, if anything, is sent upstream when the small model fires.

Where to start

  1. Pick the narrowest task that solves the problem: a keyword, a speaker count or a sound class, rather than full transcription.
  2. Start from an open baseline: microWakeWord for wake words on ESP32, pyannote Community-1 for diarization, YAMNet for sound tagging.
  3. Record real audio from your target device and environment, and evaluate on that before trusting any published number.
  4. Quantise and re-measure accuracy and latency on the actual hardware.
  5. Use a two-stage design: a small model that runs all the time, and something heavier that only wakes up when it fires.

edge AIsmall modelskeyword spottingspeaker diarizationaudio classification