Inspiration

=======================================

While the Spotify recommendation algorithm does its job in a satisfactory manner, the large company doesn't take into account the inner person. MelodyMood was designed to appeal to the individual mindset, rather than the collective mindset of massive companies. As first year computer science students, we wanted to make our first major project something that the general public would value.

What it does

=======================================

MelodyMood Playlist Generator creates a Spotify playlist with a specified number of songs for the user. The playlist's determination is based on a multiple choice personality test that the user must take to determine the genre that fits their personality. At the end of the playlist's creation, an option to play a 10s demo of each song in the playlist is present, starting at the exact midpoint of each song, no matter the length, iterating through the playlist. The songs will also be added to a playlist created in the user's Spotify account.

IMPORTANT: Upon uploading the code to GitHub, the essential OpenAI key is disabled by OpenAI as their security measure.

How we built it

=======================================

We first constructed the back-end logic of the creation of the playlists. We started off in the VSCode terminal testing the components that would later be transferred to the front-end. We determined the algorithm for how results would be determined, how to derive songs out of the results via OpenAI recommendations, get track URI's for the given songs via the Spotipy library and Spotify API, and place them into the created playlist on the user's account. Finally, we determined the logic of playing the demo of each song in the playlist, iterating through it, and debugging potential errors pertaining to durations. Moving to the front end, we first constructed the home page to be instantly appealing to the user, and easy to navigate. Then, we constructed the multiple choice questions/answers, and tied it with the back-end logic.

Challenges we ran into

=======================================

The main challenges we faced were in the front-end development. Using flask and connecting HTML with Python created many errors that stumped progress early in the process of creating the project. Researching questions and answers that would render accurate results was another great challenge, which pertained to the efficacy of our playlist generator. Finally, the general design of the webpage rendered itself a tedious task.

Accomplishments that we're proud of

=======================================

Our main accomplishments in the back-end are successfully determining the logic of keeping track of the results of the test as it progresses, and determining a final verdict. With that final verdict, we successfully used OpenAI to find song recommendations based on the correct prompt corresponding to the resultant personality, and used the Spotify API to reach into Spotify to find the track URI of each song, adding them to the playlist on the user's account. Finally, the logic behind playing the 10s midpoint of each song as a demo of the playlist. Our main accomplishments in the front-end are the designing/styling of the webpage using HTML and CSS. We successfully received and validated input from the front-end and transferred it to the back-end logic.

What we learned

========================================

We have learned in greater detail about front-end and back-end development, and how they interact when putting them together to solve a problem. We have learned how to use flask to create our webpage. Additionally, we have learned how to navigate APIs and API libraries to work with features of an external application such as Spotify, and how to debug errors concerning tokens, ClientID/client secret, JSON objects, etc.

What's next for MelodyMood Playlist Generator

========================================

MelodyMood will expand into the realm of podcasts. The goal is to have an algorithm to recommend to the user n podcasts based on their personality and interests. The user would then be able to use MelodyMood as a helper to find media on Spotify that would suit them, whether it is music or podcasts. Also, more questions and personalities will be added to render

Built With

Share this project:

Updates