開発ノート
A speed alert the driver does not switch off after ten minutes
A 3 km/h hysteresis band, cooldowns of 30/20/12 seconds, and one important exception: an escalation speaks immediately.
A speed-warning app that gets switched off is a speed-warning app that does nothing. This is a real design problem, not polish.
Three ways to get yourself switched off
- Flickering with noise. Hold exactly 60 on a 60 road and GPS wobbles a few km/h, toggling the alert on and off.
- Repeating too densely. The same sentence spoken every five seconds along a long stretch.
- Talking over music and not giving it back. Audio that is interrupted and never restored is reason enough to uninstall.
The 3 km/h hysteresis band
The alert engages at one threshold and disengages 3 km/h below it. Wobbling around the boundary therefore cannot produce a stream of toggles — leaving the alert state requires genuinely slowing down.
Cooldowns by severity
After an alert, that same level is locked out for 30, 20 or 12 seconds depending on how far over you are. The further over, the more often you are reminded, because the risk is higher too.
The exception that matters most
When the violation escalates — from slightly over to well over — the alert fires immediately, ignoring the cooldown. That is the moment the driver is accelerating, and the moment the sentence is worth the most. A mechanical cooldown would fall silent exactly when it should speak.
The +5 km/h safety margin
By default nothing counts as a violation until you exceed the limit plus 5 km/h. GPS is a few km/h out, and most limits are inferred anyway — a zero margin turns measurement error into speech. It is adjustable in Settings.
When the device has no Vietnamese voice
Plenty of head units ship without a vi-VN TTS engine. An app relying on speech alone would be silent on exactly those devices, at exactly the moment a warning matters most. VoiceAlerts checks whether a voice exists and falls back to a beep when it does not. It also requests transient ducking audio focus, so music is lowered and then restored rather than cut off.
