Sleep as Android: Saying goodnight to snoring with TensorFlow
“Sleep as Android is all about helping people improve their sleeping habits, leading to happier and healthier lives,” says Petr Nalevka, founder and developer at Urbandroid. Common alarm clocks ignore your sleep cycles and wake you up even if you are in a deep sleep. Sleep as Android is different. The app tracks your sleep to find the optimal moment for you to wake up.
“Snoring detection is an important feature of the app, as this can have the biggest impact on sleep. But to make this feature as effective as possible, we faced a big challenge – the sheer amount of data we would need to collect and analyse. This data, collected from our users on a consent-basis, would give us great insights.” To overcome this, Petr and his team realised they needed to move away from traditional statistical models and find a new approach.
That’s when they began exploring the capabilities of machine learning – an approach that teaches machines to analyse sets of data, to accurately solve complex problems.
Using TensorFlow, Google’s open source platform for building machine learning applications, the Sleep as Android team built and trained a new model to precisely detect and measure a range of different types of snoring. Since introducing the improved feature, the team has received nothing but positive feedback. “TensorFlow has given us the edge. We now have one of the best snoring detection features on the market,” says Petr.
Currently with over one million active users, the app has helped 18 million people improve their sleep over its lifetime. It’s also led to diagnoses of snoring-related conditions for people who didn’t even know they were snoring. “It’s amazing to think that by helping people change the way they sleep, we can also change their lives for the better,” says Petr.
One way Sleep as Android can use AI to improve lives has been evident since COVID-19, as Petr and his team have used the app’s powerful sleep tracking capabilities for a ground-breaking study to understand how lockdown affects sleep. “When lockdown started, we wanted to see how we could use AI to solve new problems and create new use cases. So, we went back to our core mission – improving sleep – and embarked on a COVID-19 sleep study.”
Based on data submitted by users globally, the study has assessed sleeping patterns in Wuhan, Italy and the US – and the results are astonishing. “Before lockdown, we were aware of what we call ‘social jetlag’ – when people use the weekend to catch up on sleep they’ve missed,” says Petr. “But during lockdown, we saw social jet-lag disappear, as people could sleep according to their own routines.”
These findings showed that those whose sleeping patterns were most affected are what are known as “night owls” – those who naturally go to bed late – which signals an opportunity to show how social pressures can affect sleep. “It’s a unique opportunity to study social jetlag on a massive scale. The data can help people understand their own sleeping patterns and adjust for a better life,” says Petr.
The Sleep as Android team are also contributing to local COVID-19 projects, including a Bluetooth contact-tracing app, and Petr is working with a community of local business owners and developers to find creative solutions to COVID-19 challenges.
“We want to understand how people are behaving and how we can use tech to make life easier,” he says. “We can already do sophisticated tasks with AI, and if these can be made efficient at scale, AI can revolutionise many industries.”