Digital wellbeing apps are constantly improving day by day. Every new device comes with a significant improvement in the digital wellbeing department. There have been numerous gadgets and wearables in this department. While there is Nest Hub with a dedicated radar to track bad sleep and smartwatches have sensors to record turns, Google on the other hand may soon be able to use microphone to make record of your night unrest. In simple words google’s digital wellbeing app will soon support cough and snore detection by implementing a new API.
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, except the client is the Digital Wellbeing app this time.
The short explanation is that Android System Intelligence will retain continual access to the microphone via the Sensor Hub and, when a noise event occurs, will wake up the CPU to understand what's going on. The data plot is eventually received by Digital Wellbeing from ASI, but the audio is never handed along. All of this should happen without putting too much burden on the battery.
Third-party applications are presently unable to acquire cough and snoring data obtained through the Ambient Context API and the processes that go with it, but that might change as soon as Android 14. In the meanwhile, we're just waiting to see how effective Google's sleep tracking technology is.