Inspiration

Whenever in a social group setting, it can be difficult and frustrating for everyone to contribute to the music being played. Often, someone will plug their phone into the audio system and become the default "DJ" of the night, and they must occupy their time with constantly fulfilling song requests. We wanted to make a seamless and easy way for people to contribute to a music playlist by simply texting song queries.

What it does

To use TextJam, you send song queries through text messages to Google Play Music. These queries are analyzed based on Play Music's searching algorithms, interpreting queries as the most relevant song in the Play Music database. TextJam then sends a confirmation text to the user, and queues the song in a newly-created public playlist.

How we built it

All programming was done in Python, the common language of the Twilio API and the unofficial Google Play Music API. Twilio provided the back-end for processing text messages, while Google Play Music API provided the back-end for creating playlists in Play Music. Two main processes run in Python: one process constantly queries the Twilio service to obtain new text messages, while the other process builds the song queue based on the number of song queries. These songs are decided within the Python program almost immediately, but they aren't added to the Play Music playlist until the last possible moment to allow for votes to be accrued.

Challenges we ran into

We ran into three principle challenges during the creation of TextJam. The first problem was the implementation of a system to periodically add a song to the Google Play Music playlist. The second main challenge was interfacing with Twilio. We tried many potential solutions before eventually settling on periodically polling the Twilio servers. The last problem we ran into was debugging. There were many weird and elusive edge cases plaguing our project. Hunting down the various bugs and verifying functionality proved to be difficult and time consuming. For example, we ran into issues with the Google Play Music returning unicode characters that Python found difficult to interpret. We eventually made changes to avoid running into the problem in the first place.

Accomplishments that we're proud of

We successfully interfaced two separate APIs to create a cohesive product that we would actually find useful in our daily lives. This product also works without a standalone app, meaning it is extremely accessible and lightweight. To help users understand TextJam, we developed a splash page at textjam.gcan.co. This website provides a QR code and basic instructions that let users find the phone number to text.

What we learned

As a team of freshmen submitting their first hackathon project, we learned a great deal from TextJam. None of us had back-end experience before this project, and none of us have ever interfaced with an API before. We learned about these processes and we gained additional skills in debugging, Python multi-threading, and web design.

What's next for TextJam

We have a lot of features we would like to implement. We want to expand beyond a single Google Play Music user and let this service be used by anyone with a Google Play Music All-Access account. We also want to interface with the Spotify API to reach an even larger user base.

Share this project:
×

Updates