America has more than 30% of the people who are suffering from sleep deprivation. But not the America, the statistics are astonishing for the whole world! In fact, more than 90% of Indian population doesn't get enough sleep as recommended by the doctors. But there are a few techniques which can help a person to have a longer and deeper sleep. Keeping that in mind, this skill was developed: Soothing Sounds: Relax, Study or Meditate.
What it does
Soothing Sounds skill has 40 different sounds, including white noise and other rare yet proven to be helpful sounds like: womb sound, whale sound, wind-chime sound and many more! A user can ask Soothing sounds to play any of the sounds. Each sound is at least 30 minutes long which can also be put on a loop to set a non-stop relaxing environment. Otherwise, the skill plays all the sounds in the list one by one. Soothing sounds also allows the user to play a particular song and continue the list from there onward.
How I built it
I have used audio-player-api for the Echo device. I used the Amazon's dynamo-db to save the attributes of the audio player for each user. As a user can pause and resume at any moment, it was required to save current millisecond step of the audio. Apart from that, apart from basic features of an audio player, an extra feature to select any random audio was also developed. So that, a user can conveniently seek through the list or open any of his/her favorite sound with just one command.
Challenges I ran into
This was the first time I had developed an audio-player skill. I had to learn the whole audio player api and implement all the necessary intents. This part was new and kind of tricky for me.
Accomplishments that I'm proud of
I was able to learn and implement the audio player api skill with a little help. I had never used dynamo-db so extensively. But while developing the skill, I was able to learn dynamo-db even better and consequently, gained more confidence and experience. The most tricky part was playing random audio from the list of all audios. I was able to get that code run within a few hours!
What I learned
I was able to learn quite a few things while jumping around with the ideas. But the most important skill that I was able to develop was of audio-player-api. I had never developed any audio player app. So, it was quite new, yet exciting for me to learn how the audio players work. As Alexa cannot play sounds longer than 90 seconds in a normal skill and that too at just the rate of 48 kbps, something more was required. To play the longer and high quality sounds, I had to learn the audio player api. I also got to learn more about soundcloud's audio hosting and how their feeds can be used.
What's next for Soothing Sounds: Relax, Study or Meditate
In the skill's description an e-mail Id has been included to collect the user's requests of particular sounds. So, in the next version, more sounds will be added. Also, the upcoming version of Soothing sounds will become compatible for echo devices with the screens.