Real-time ML classification, mobile to dispatcher
A user presses a panic button and help has to be routed correctly, immediately. The hard part isn’t the button. It’s that the person pressing it often can’t explain what’s happening, so the system has to work it out and route it before anyone speaks to them.
What I built
- Hold-to-send trigger on device, capturing audio and GPS
- Upload path optimised for latency over completeness. Partial signal fast beats complete signal late
- DistilBERT 7-class classifier containerised on Cloud Run, autoscaling from zero
- Live dispatcher console rendering the classification alongside the raw signal, with human override
Decisions worth naming
- The model is a speed advantage, not an authority. Classification never silently determines routing. The dispatcher sees the reasoning and can override.
- An “unclear” class is a feature. Forcing a confident answer on an ambiguous signal is worse than surfacing uncertainty. Most systems are graded on avoiding this. This one is designed around it.
- GPS accuracy gating. Early builds rendered every location fix, producing a marker that wandered when accuracy was poor and destroyed operator trust in the map. Fixed by rejecting low-confidence fixes rather than displaying them. A UI-looking bug that was actually a data-quality decision.
- Serverless because load is spiky. Emergencies don’t arrive on a schedule.
Verified end-to-end on physical devices in release builds, not simulator. 29 automated tests covering the flow. Running live.