Inspiration

github link: https://github.com/wsasaki01/bath-hack-2024

We all have a love for listening to music. This app enhances your experience by suggesting you new music based on your listening habits, adding a new spice to your daily listen.

What it does

There are 3 main features:

  • Generate a playlist based on your last 50 listened to songs
  • Generate a playlist based on a text prompt you provide
  • Blend 2 peoples playlists to find music that suits both of you

How we built it

All three main features are underpinned by the use of word embeddings. These are vectors that represent words meaning with respect to other words in the corpus. This is done by using the FastText algorithm to train a model on the data we collected. The data for each song consists of a description generated by an LLM describing that song in 50 words. Once we have vector representations for word, we can sum all the vectors in a sentence to get its representation. Then using cosine similarity we compare the descriptions of songs to find songs of similar style. These vectors are then (100, 1) in shape so are quite hard to visualise. To get around this we used dimensionality reduction to create (2, 1) vectors that can be plotted on a scatter graph, creating a field of words. We can use geometric ideas to implement the blend function. By taking the 50 most recent songs a user has listened to, we can average them out to get an average taste. We can then take the midpoint of the 2 taste vectors and draw a circle round that point to find similar songs that should be liked by both parties.

The website was created in flask and everything was coded in python.

What's next for ConnecTune

The main limitations we have is that we need to generate more song descriptions for the word embedding. We currently have about 3,500 songs with descriptions but increasing that will improve the suggestions that the model can make.

Share this project:

Updates