We read an article about how certain songs could calm a person's heart rate down during anxiety attacks. This inspired us to want to create an application that could automatically play a certain song upon analyzing a person. We noticed google's emotion recognition software on the first day and decided to implement a smaller scale version of our initial idea using the resources we have. Thus SnapJam was born.

What it does

SnapJam is a web application that plays music based on your mood. It starts by taking a photo of your face via webcam and analyzes the emotion (Joy, Anger, Sorrow, or Surprise). SnapJam then redirects the webpage to a Spotify song or playlist that matches the given mood.

How we built it

We built it using Google Cloud's Vision API to detect emotion, which had the four options mentioned above. On the frontend, we used the webcam to take a picture and then parsed it into the the Google API functions to identify the emotion using Node.js. We then selected Spotify playlists for each level of each emotion and redirected the page to the corresponding playlist.

Challenges we ran into

We decided to code in a language we barely knew (Node.js) and we often went in roundabout ways until we found the most efficient code. The main challenge we faced was figuring out how to use the APIs for google and spotify together.

Accomplishments that we're proud of

We ran into many obstacles, but in the end we have a functioning web application. We are very proud of it.

What we learned

We learned to keep trying and not be afraid to ask for help. Even wild ideas can be figured out and eventually created.

What's next for SnapJam

We want to make it into an accessible webapp or mobile application, and use Spotify's APIs to further this project by perhaps returning Spotify songs catered to each user or returning songs that the user has not heard before, and we would also like to develop this application to recognize anxiety levels and return calming music when levels are high; however it definitely needs a lot of fine tuning before that. Hopefully we can get it to our initial inspiration in the future.

Share this project: