Build in Public · 6 Parts

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.

  1. Turning a microphone into training data
    Part 1

    Turning a microphone into training data

    I wanted to count the sirens passing my window. Before comparing detectors, I had to fix a gain error that ordinary room audio had not exposed and check the shared capture path.

  2. A hand-tuned detector, before any model
    Part 2

    A hand-tuned detector, before any model

    I started with inexpensive DSP rather than a learned model. It looked good on the clips I tuned it against, until a repaired evaluation path finally included the held-out days.

  3. The labelling design that decided the whole trial
    Part 3

    The labelling design that decided the whole trial

    Reviewing only flagged clips would not tell me how many sirens the detectors missed. I reserved labels for low-scoring clips and recorded selection probabilities, while keeping disagreement labels separate.

  4. Picking a model without picking a favourite
    Part 4

    Picking a model without picking a favourite

    The tested cloud models scored better than DSP, but none fitted the container budget. The comparison left DSP in place for that service without ruling out smaller models or a different hosting design.

  5. Shrinking a CNN to 9.5 KB and putting it on a chip
    Part 5

    Shrinking a CNN to 9.5 KB and putting it on a chip

    A small CNN fitted the device where the cloud candidates had exceeded their budget. Getting it ready also meant checking the audio frontend, rounding differences and which days each evaluation model had seen.

  6. Running three detectors for real, and stopping early
    Part 6

    Running three detectors for real, and stopping early

    The chip model outperformed my DSP baseline in the live comparison. I also report the early stop, the incomplete evidence for the full exit rule and the limits of evaluating the retrained model.

← All blog posts