How the microphone hears your breath
If audio isn't recorded, how does the app measure your breath? The noise floor, a threshold that moves with the room, and how the start and end of an exhale are found.
6 min read
The app doesn't record audio to measure. The stream from the microphone isn't written to disk (the one exception is audio sample sharing, which you agree to separately). Dozens of times a second the sound level at that instant is worked out, and only that number is kept. So what the app holds isn't an audio file but a series of numbers: a line that rises and falls.
Every measurement is made from that line.
Silence is measured first
There is a three-second listen at the start of a session. In that time the room's noise floor is measured: the hum of the fridge, traffic outside, the device's own electronic noise.
It isn't an average — it looks at the quietest moments of those three seconds. That way, putting the phone down on a table at that moment, or someone coughing, doesn't throw off the threshold for the whole session.
The room is re-measured during the session
The room can change during a session: an air conditioner comes on, a window gets closed. So the floor is re-measured throughout the session too. The session doesn't stop, and nothing is asked of you.
Every so often during the session the app looks at the quietest moments between your breaths and re-measures the floor. The exhale itself doesn't go into this measurement.
Short sounds don't move the floor: someone talking for a moment or a door slamming doesn't raise the threshold. When the room changes for good, say an air conditioner comes on or goes off, the floor follows it.
However noisy the room gets, the threshold never rises so high that your exhales can't be heard.
The warnings during the session, such as "Your breath is hard to hear" or "move the device a little further away", and the breath volume in the report measure each exhale against the floor at that moment. Both look at the same number.
The threshold isn't absolute, it is relative to the floor
For a sound to count as an "exhale" it doesn't have to pass a particular decibel level. It has to rise a certain amount above the floor. In a quiet room that threshold is low; in a noisy café it is high.
How far above the floor depends on the technique. A breath out through the mouth (extended exhale, pursed lip) comes out loud. A calm breath out through the nose (coherent, box) is much lower. A breath through a single nostril is the lowest of all. Every technique is listened to with its own threshold; holding them all to the same bar would make the nasal techniques inaudible.
The start and end of an exhale
The raw sound level is too jittery to use directly. It is smoothed first — each new measurement is blended with the one before, so a single click doesn't turn into an exhale.
The exhale begins when the smoothed line crosses the threshold. Once the sound drops below the threshold and stays there briefly, the exhale counts as finished. An audible inhale right after it doesn't stretch the exhale, and two breaths aren't counted as one.
Very short sounds, like a click, don't count as an exhale.
The quiet room and the tablet problem
Thresholds being relative to the floor works in most cases, but it has a trap: if the floor really is very low, the relative threshold becomes over-sensitive and every creak in the room can count as an exhale. So there is a lower bound on how far the floor can go.
If the bound is too high, the opposite happens: on devices whose microphone is far away, like a tablet, the exhale's margin melts away and the breath isn't heard. That is why where the bound sits is set from real recordings, not guesswork. How that is done is explained in How the thresholds are measured against real recordings.
Fast breathing is a separate job
This method has a limit: telling that an exhale has ended needs a short silence afterwards. In a technique breathing out faster than once a second, that silence never appears.
So Kapalabhati is measured a different way. Rather than trying to separate the exhales one by one, the app counts the moments when the sound line peaks and looks at how regular the gaps are. One exhale isn't counted twice.