Siren Counter
Sirens outside my window pass often enough to be a genuine disturbance, so I built an ESP32-S3 device to count them. This series walks through the whole decision chain — audio capture, a hand-tuned DSP detector built before any model, the labelling design that made a fair comparison possible, a cloud model bake-off, an on-device CNN squeezed into 9.5 KB, and the pre-registered trial that decided which one actually ships.
-
Part 1Turning a microphone into training data
Sirens outside my window disturb me daily, so I built a device to count them. Before any detection algorithm, before any model, the mic itself had to prove it could hear a siren without lying about it. It didn't, at first.
-
Part 2A hand-tuned detector, before any model
The first detector I built for the siren counter wasn't a model. It was a threshold, a duration gate, and a lot of arguing with real audio about what counts as a siren. It looked done. It wasn't.
-
Part 3The labelling design that decided the whole trial
Every model comparison that follows in this series rests on labels collected 20 clips a day, by hand. Get the sampling wrong and no amount of modelling skill downstream can fix it. This is the unglamorous part that decides everything else.
-
Part 4Picking a model without picking a favourite
A ResNet, a pretrained audio embedding, and a zero-shot baseline all scored higher than the hand-tuned DSP detector. The DSP won anyway — because the bake-off measured a question nobody usually bothers to ask before picking the best model.
-
Part 5Shrinking a CNN to 9.5 KB and putting it on a chip
The cloud model beat the DSP baseline and still couldn't ship — too heavy for the container. On-chip has a different, much tighter constraint: 450 kilobytes of flash. This is the model built to actually fit inside it.
-
Part 6Running three detectors for real, and stopping early
Every part of this series has been building toward one test: run the detectors live, on real clips, for real, and see what actually happens. It ran for 17 of its planned 30 days. Here's the honest ending, including the parts that didn't go to plan.