Inspiration

The inspiration for SnoreScore actually came from Corey's dad. After several business trips that required him to share rooms with colleagues whose snoring disrupted his own sleep, he became concerned that his own snoring may do the same for others. While there are several apps available to help monitor nightly snoring, he noticed that no app tried to help prevent it. For many people, a small shift in sleeping position can help stop snoring, so the key idea for SnoreScore was formed: create an app that both monitors nightly snoring while also helping prevent it through gentle auditory or haptic stimulation.

What it does

The premise behind SnoreScore is quite simple. SnoreScore uses the microphone in your iPhone to listen for snoring in your sleep. However, unlike several apps that simply monitor your sleep in this way, SnoreScore actually helps you stop snoring. SnoreScore monitors your sleep in real time, and as it detects periods when you are snoring, it sounds a gentle alarm to lightly disturb your sleep (without waking you up) and encourage you shift to a different position. This simple action is enough to help many people stop snoring in an unobtrusive way. Furthermore, we added additional functionality to SnoreScore for Apple Watch users. SnoreScore extends to the Apple Watch and utilizes haptic feedback as an alternative way of unobtrusively stimulating user movement. At the end of the night, you receive a score based on how much you snored, how loudly you scored, and how responsive you were to SnoreScore's stimulus.

How we built it

SnoreScore was built in Xcode using Swift. We used the AVFoundation library to access the iPhone's microphone and speakers. To incorporate functionality with the Apple Watch, we used the WatchKit and WatchConnectivity. We used Background Mode capabilities to enable our app to continue running while the iPhone is locked.

Challenges we ran into

While the premise of SnoreScore is fairly simple, implementing it into a streamlined iOS app was a challenge for our team throughout the course of development. Only one member of our team had any experience programming in Swift, so the rest of the team was quickly learning on the job. This lack of experience added an additional layer of complexity for even simple tasks. The two biggest issues that we faced in developing our app were reliably accessing the iPhone microphone and pairing with the Apple Watch. Even after carefully reviewing Apple's documentation and even consulting with Apple employees at the event, it took hours of work to finally achieve the desired result.

Accomplishments that we're proud of

Despite our overall lack of experience, our team was able to complete a fully-fledged iOS/Apple Watch application that has the potential to help a lot of people. While there are still many more features that we would like to add to the app before we would release it, not to mention considerable testing to find optimal operational parameters, we were able to incorporate all features that we hoped to be able to demonstrate by the end of the event. Our app can read access the iPhone microphone continuously, even when the phone is locked, and respond to specific stimuli with an audible response. Furthermore, we added the additional functionality of haptic feedback with the AppleWatch as either a supplementary or alternative form of stimulation to stop your snoring. We also added a method for the user to calibrate the app to their environment and several settings to help personalize the user experience. Overall, we are very pleased with the current state of our app.

What we learned

Throughout HackIllinois, everyone on our team learned a lot. Certainly we all vastly improved in our knowledge of programming in Swift, but this is perhaps the least important lesson. Our app forced us to learn brand new programming concepts that we had not worked with before, from sessions to segues. Two members of our team were introduced to version control through GitHub. We also learned to work well as a team despite the strains of sleep deprivation and a looming deadline. We had to rely on each other, and the gracious help of other students and mentors, to get the whole project finished in time.

What's next for SnoreScore

As it stands today, SnoreScore could be used for its intended purpose of tracking and preventing snoring and providing an outlet to display this information for the users. However, there are several additional features that we would like to add to our app before we could consider it truly complete. First, we would like to vastly improve our "scoring" system. Given that "score" makes up half of our app's name, we would like to provide the user with as meaningful of a final score as possible. Given the time constraints of this competition, we only had time to develop a scoring system that focuses on the number of times that the app attempts to stop you from snoring. In order to give the user more information, we would ideally like to break the score down into several categories including snoring volume or responsiveness to the app's preventative measures, and developing a final score from these parameters. Without having time to test our app with several users over several nights, we did not have enough data to confidently develop a more inclusive scoring algorithm at this time. Continuing in the spirit of providing the users with data, we would like to store nightly data into a database to show user their snoring over time. Perhaps this could show them certain trends that could help them get better sleep. We would also like to have more user-adjusted settings to personalize SnoreScore to each and every user. Furthermore, it would be nice to have more complete documentation available to the user on how each setting will change their experience with SnoreScore. Once again, without being able to run substantial real-world testing on the app, we found it difficult to make such suggestions at this time. One more important feature we would like to include is a large variety of sounds that can be played to help cause the user to stir. In addition to having a library of sounds available to the user, it would furthermore be nice to give the user the ability to add their own sounds. This not only helps customize the app to each user's tastes, but can also help each user find a particular sound that helps them the most. Finally, we would ideally like to add a better snoring-detecting algorithm. Currently, SnoreScore detects snoring only from a difference in volume in the room. During the night, these disturbances are very likely to be from snoring, but there are certainly other potential sources of noise. We tried to prevent any extraneous noises from registering as a snore to the best of our ability, but with more time we could likely improve this algorithm.

Built With

Share this project:
×

Updates