How the thresholds are measured against real recordings
What counts as an "exhale" isn't decided by guesswork but from real audio samples sent by users. How that work runs.
5 min read
For the app to count a sound as an exhale, that sound has to be a certain amount above the room's silence. So where does that "certain amount" come from?
We start with a guess, then move on to measurement.
Why it starts with a guess
When a new technique is added, we don't have a single recording of it. The threshold is taken over from similar techniques: for a technique breathed out through the mouth, the value of another mouth technique in the same family; for a nasal one, the nasal family's.
That guess is usually roughly right but not exact.
How the measurement is done
From users who turn on anonymous sharing and audio sample sharing, the audio of their sessions arrives, at most ten sessions a day per person. With each comes that session's report and raw timing: at which seconds the target exhales were expected, at which moments the app detected an exhale, and what the noise floor was.
With those two together the measurement becomes possible. The audio file is run through the app's own detection code — the same code, the same arithmetic — but with the threshold changed. Then the question: at which threshold were how many target exhales caught, and how many false detections occurred?
If catches rise and false detections don't, the threshold is lowered. If both rise, it is left alone.
A real example
The app has a lower bound on how far the noise floor can go: it stops the thresholds becoming over-sensitive in very quiet rooms.
In sessions done with a tablet in a quiet room, this bound could make the breath inaudible: the room's noise floor was far below it. Looking at real recordings, the bound was lowered: more exhales were caught, and false detections didn't increase.
A correction like this can't be found by guesswork. Without the recording we wouldn't even have known the problem existed.
If the room changes during a session
The floor is also re-measured throughout the session. This was tested against the same recordings too: with an air conditioner's hum, talking or a door added on top, the exhales are still heard.
This is the only job audio sample sharing does
The audio that is sent is listened to for this and nothing else: measuring the accuracy of breath detection. It isn't used for any other purpose, isn't given to third parties, and is deleted from your device once sent.
If it is off, audio is never recorded in any session. The app works completely without this permission.
Thresholds are updated over time
As recordings build up, the same scan is run again and the values are updated.
So the app's measurement accuracy grows along with the people using it.