Whenever I hear a song on the radio that I like, I ask Siri "who sings this?" I find my camera roll full of screenshots showing me the results. Up until this point, only the lucky few I remembered were added to my Spotify playlists. I wanted to create a handy bot that would take these screenshots and save them automatically for me.
In order to get my screenshots to Spotify, I knew I would need a few things. I'm using and optical character recognition software (OCR Space), Spotify, Twilio, and Heroku.
This gem is rather simple. When I sent my image via Twilio, it produces a media type and media url. All I needed to do was plug in the url via the gem documentation directions (see code above). This will feed me back a string of the results. Next, I needed to find the general convention and analyze the results to find the SONG_NAME and ARTIST_NAME.
To connect to Spotify, I needed to register my app and obtain all of the proper codes/tokens/keys. This wouldn't be necessary, however, I wanted to be able add, create, change a playlist on my profile. Once this was obtained, I was able to take the SONG_NAME and ARTIST_NAME and find a corresponding track. Then saving them to a newly created Spotify Playlist.
I choose to keep this bot very simple in it's task. Much like Digit, the user is limited in its option. The bot creates a default playlist, the user sends the screenshots that they want saved to the playlist. Right now the bot works as planned, I plan to work on this further and use the bot frequently in future. I also hope to share this with friends.
While there is no snappy name...just yet. Screenshots&Spotify has a rather generic personality, with a hint of enthusiasm. Much like myself when I got the code for this bot to work. I wanted it to feel proud and excited that it found the songs and saved them to Spotify. I had pivoted last minute to accomplish this idea, so while I was able to rework my workflow and data diagram, the wizard of oz exercise was actually conducted using a different concept. The pivot occurred in time to allow me to scrap together an experience prototype. Here I walked people through my concept and the user flow. I made sure to screenshot all of the responses in order to help foster ideas as well as hone the language being used.
The data diagram will be ever evolving as I begin to build my database in the next few weeks. I know that I will need to account for images sent (as to not have repeats), playlists created, playlist in use, and user session, to name a few.
I have grand plans for the future of this bot, as well as my original concept. In the near future, I plan to fix issues with the OCR results to account for Siri's range of responses. As mentioned above, I am also planning and mapping the database I will use to store crucial information for the user and their profiles. I would also like to explore the idea of changing playlists, viewing saved tracks, and perhaps even playing a random song (thanks Daragh during the experience prototype)!
You can upload files of up to 20MB using this form.