Most sleep apps work like this: a motion sensor or heart-rate curve feeds a model, the model guesses your sleep stages, and you get a score in the morning. The score might say 78. What it can't tell you is why.
We build SleepTrace, an audio-first sleep tracker, and this post is about the engineering reasons we bet on sound instead of another wearable.
The signal nobody records
The events that actually destroy sleep quality are acoustic:
- snoring (intensity, patterns, position-dependence)
- gasping / breathing pauses that may warrant a doctor visit
- sleep talking and grinding
- environmental noise: partner, street, pets
A phone microphone on the nightstand captures all of these. A wrist wearable captures none of them directly — it infers downstream effects (movement, heart rate) and guesses at the cause.
Evidence beats scores
The product insight: people act when they hear a 20-second clip of their own 3 a.m. snoring. Nobody changes their behavior because a number dropped from 82 to 78. So instead of leading with a score, the app leads with an audio timeline of the night — the moments worth hearing, classified on-device.
The hard constraints
- All-night recording on iOS/Android without draining the battery. Background audio sessions, watchdog timers, and OS-specific keep-alive quirks are half the codebase's gray hair.
- On-device classification. Recording a bedroom is the most privacy-sensitive thing an app can do. Clips are processed locally; nothing leaves the phone without explicit opt-in. Privacy has to be structural, not a checkbox.
- Storage discipline. A full night of audio is large. We keep event clips, not raw nights.
What the literature says
Acoustic analysis is a legitimate screening signal — snoring characteristics and audible breathing pauses correlate with apnea-hypopnea severity. We collect the relevant studies with citations on the SleepTrace sleep science blog if you want to dig into the research side.
Happy to answer questions about background audio sessions, on-device audio ML, or the privacy architecture in the comments.
Top comments (0)