Cough and snore detection on the Pixel 7 will work like this
Google may be going to great lengths to track your health while you’re awake and alert, but when you’re dozing off, it may have another trick up its sleeve. Owners of the second-generation Nest Hub may have a dedicated radar system to detect bad sleep, and smartwatch wearers may have other sensors that record tosses and turns, but those with a Pixel 7 (and possibly other capable Pixels) may soon be able to record their unrest with their microphones.
We’ve been reporting on how, with the implementation of a new API called Ambient Context, the Digital Wellbeing app appears to be preparing to support cough and snore detection. Now, thanks to Esper Technical Editor Mishaal Rahman, we have a better idea of how the feature will look and function.
Users of Digital Wellbeing who want to enable the feature will see this screen, though in reality, the requesting party will be Android System Intelligence, a system-level service that handles a slew of connections, such as provisioning microphone audio data for use on the Pixel-exclusive Now Playing feature. The same thing is happening here, but the client is the Digital Wellbeing app this time.
The short version is that Android System Intelligence will maintain constant access to the microphone via the Sensor Hub and, when a noise event occurs, will wake up the CPU to interpret what’s going on. The data plot is eventually received by Digital Wellbeing from ASI, but the audio is never passed along. All of this should happen without putting too much strain on the battery.
Third-party apps are currently unable to obtain cough and snore data obtained through the Ambient Context API and the processes associated with it, but this could change as soon as Android 14. Meanwhile, we’re just waiting to see how effective Google’s sleep tracking system is.