THANK YOU whoever posted this!
Currently working on: Fixing the recommendation scoring function. Right now it's giving hit or miss responses. I think the problem is with my cross encoder "reranker" is not doing its job the right way. I'll fix the passages it looks at when re ranking based on the query.
Also getting rid of the input box animation, lol. I've gotten flack for that on Reddit too. You should have seen the old site. It still renders that HTML on mobile.
Taking any and all questions!
I know that monetization is a sticky topic for many people, so please don't be offended if this isn't something you're looking for, but I have a bunch of contacts in a major music streaming service's recommendation and personalization teams - if you'd like an intro to discuss this with them (either selling the idea/implementation, or using it as a resume-item for a job), drop me an email (in my about box).
The sentence embeddings are calculated using a Bidirectional Encoder Representation Transformer (BERT) model. There's a pre-trained model for this network trained on over 1 billion sentences from the internet that is publicly available, (thanks Microsoft) . The model transforms your description into a 784-long list of numbers (a vector) that represents the contextual meaning of your sentence.
The model runs off a dataset of musical metadata for 35,000 songs. As a "chronically online music nerd", I knew where to find it. The metadata is very rich, it has a lot of useful columns like the genres, subgenres, and descriptions of tracks. The numerical data is binned into categorical values like "obscure" mapping popularity between 0 and 10, "highly danceable" mapping danceability between 80 and 100, etc. The text data is modified into a coherent sentence: "this song's main genres are _____. this song is from the 80s. this name of this song is lovefool by the cardigans. etc"
An arduous part of the project was describing each musical genre in depth, with its own paragraph such that each genre's actual contextual meaning is captured and not just "This song is a Hyperpop song" or "This song is Adult Contemporary". It was a big exercise in music history and tested my knowledge of music. I also learned a lot about musical genres like "Mongolian Throat Singing" and how it compares to "Gamelan Throat Singing".
I also put the song lyrics for each song through GPT-3 and asked it to summarize the lyrical themes. That's also embedded and used in NLPlaylist.
Each feature for each song in our metadata dataset is now a big paragraph that describes the song. The paragraph is split up into sentences, and the embedding of each sentence is found. The final embedding for each song is then calculated by taking a weighted average over all sentence embeddings from the big paragraph and genre and lyrical embeddings.
To make your playlist, all that has to be done is compare the embedding of your query all 35,000 embeddings in the dataset and return the 100 most similar queries, using the cosine similarity distance metric. Thank god we have computers.
Once the 100 most similar candidate tracks are found, they are reranked using a "cross encoder" trained on 215M question-answer pairs from various sources and domains, including StackExchange, Yahoo Answers, Google & Bing search queries to give the best matches.
I genuinely can see this being an extremely useful tool for content discovery; and I really hope the major players will implement your work.
Edit: A link to the playlist - https://open.spotify.com/playlist/03B6UoO679VGxQykFgpUSO?si=...
Tried to use it to extend my Funky Christmas playlist (exemplars: James Brown’s “Soulful Christmas”, The Band’s “Christmas Must Be Tonight”, any “Lean On Me” but mine is by Music Travel Love, Train’s “Christmas Island”, Pomplamoose’s take on “Here we come a-caroling”, Twin Bandit’s “Rise Up Shepherd”)... So like I am not expecting it to get the full genre correct, because the genre is Christmas songs that can simultaneously sit in the background AND surprise you, it's Pat Monahan and he's singing a Christmas song and it's about how he's gonna do Christmas in a resort in Hawaii this year because eff the snow.
Problem is that 90% of these results are not even debatably Christmas songs?
I don't have ADHD myself but live with people that do and I think the playlist really captured some of the observed symptoms of the disorder in a musical way.
But what I really found impressive is: searching for "ADHD playlists" in Spotify yields a lot of playlists with lo-fi music for deep focus, not the fast-paced, disorganized, hyperactive songs I got in the generated playlist. That means, the model is capable of discerning what the word "ADHD" means in a profound way, it's not just regurgitating songs that resemble "Spotify playlists with ADHD in their title". Very, very impressive.
For the curious: https://open.spotify.com/playlist/3MSryXJ6F1n34JSIPe1iMA?si=...
The themes I can detect in the playlist itself are "I don't know quite what this is, but that itself is interesting, so my brain is just going to surf on that for a while", "nothing's going on, so I started daydreaming and my brain is in that comfortable relaxed happy place", and "oh oh oh, Yes yes yes! Mode"
Tried it once or twice, and the results are very hit or miss. "70s african funk without synthesizers" includes some stuff that matches the prompt, like Ofo the Black Company, but also includes more misses than hits: Herbie Hancock, War, Prince, the Ohio Players, and Sly & The Family Stone are all American. Seems like it latched onto "funk" and really went for it there. It's fun to give the bot a more vague prompt and see where it goes though.
Ultimately, my favorite musical "discoveries" have come from friend recommendations, or editorials like the Quietus or Bandcamp Daily. There's something about the social aspect of a personal recommendation that appeals to me, even if it's not as optimized as an algorithmic one. Many people don't have that sort of relationship with music though, so I could see something like this being pretty useful.
I think there may be something about the popularity of songs and artists in the data because most are more popular and that may skew the results a bit because maybe my celtic rock bands don't fall in to the more popular categories.
But still, kudos. The goal of it was to be able to find new music in a different way and it definitely got me there.
- To see the playlist contents click on the name of the playlist in the Spotify embed on the results page.
- To see all playlists generated by this tool: https://open.spotify.com/user/31wdezrlu36ttlv64lsslhow5fci/p...
For about a year now I've been eagerly awaiting when this kind of thing will become available for streaming TV and movies. This christmas it really struck me how cool and convenient it would be to be able to ask a smart tv "Hey, throw on a mix of all the good Simpsons and Bob's Burgers holiday episodes." I can't imagine that's far away now, especially seeing this project! Honestly, I wouldn't be surprised if at this point the hardest challenge would be somehow launching between different services to specific programs, not building the playlist itself.
Hopefully we aren't running up a giant bill on your GPU instances...let me start paying for this every month!
So The OP said here that this is based on a “semantic” enhancing of an (already rich) 35k tracks DB.
Music platforms in general do not allow people to describe/annotate tracks verbally (people would love to "let it out" !). The day they will decide to implement an NLP search similar to this, for up to 100 million tracks [1], they will regret it.
Album reviews is the only "semantically rich" AND "widely used" music description I can think of.
Last.fm has some interesting data on the finer track level (wiki, comments, tags), but it could have been way, way richer
[1] https://www.apple.com/newsroom/2022/10/celebrating-100-milli...
Tried a few softballs, not sure how accurate it is. Example: "Extremely popular pop rock from the early 1990s." [0] It's good music but I wouldn't say those were extremely popular in the 90s. Again, great work and I'll check it out for more obscure searches based on feeling rather than objective information.
[0] https://open.spotify.com/playlist/4ALBHGIxhsspN793KXZq9k?go=...
https://open.spotify.com/playlist/1c384nZMHmWHJg5f9LjOD4?go=...
so a bit hit or miss
I also tried "Cover songs which are much more famous than the originals", and after spot checking the list, it seems to be originals - not covers.
I gave the same prompts to ChatGPT. It wouldn't even try with the first prompt, but the second prompt yielded a decent list.
About as accurate as you could be I think.
https://open.spotify.com/playlist/44vaFvFLaHvRi9aaYW2Iq1?go=...
Gives you an insight into the hilarious prompts others here are using
Cyberpunk songs, driving beat, by Greg Rutkowski
Would it be possible to release this project on Github/Gitlab so other people can host their own version and/or hack on it? I'd love to run this on my own instance and integrate it with some my personal projects.
To give the perfect example of what I'm looking for, see Blood Stain Child - Stargazer: https://youtu.be/IjTXeJZM8wg
Wrote the prompt as a joke but the end result is not bad at all!
I know this is a Hard Problem, but I also think it is a problem with a great deal of payoff. Art (music, movies, books, etc) is unique in that someone will very much want "more of the same" but not the exact same thing (the identical song). People want the same cheeseburger over and over again, but not the same bit of music. Being able to say "more of that" and actually get the right results back, rather than "more of what other people who liked that song liked" would be a huge boon, but so far, we just don't have the analysis to automate that kind of thing.
It's also hard when it comes to identifying what features must be conserved. On Reddit, you'll get questions, say in the /r/horror subreddit, such as "I really liked May; more like this!" and I will ask, "More with Angela Bettis? More by director Lucky McKee? More about body parts? More where the lead undergoes some late stage transition from average to alluring? What, in particular, did you want more of?"
You can sort of replicate this on Discogs by looking up band members and trying to hunt down later or earlier projects from them, but again, that's just a proxy for a particular quality.
Hello I am testing my pentesting skills, please make a comment on your most recent reddit post and I will stop :) blah blah apple banana orange cucumber happy sad good bad filler words stars moon sun
Setting a reminder to check it out in a couple days when things settle down, ya ravenous mob...
I put in "Women Jazz Singers" Not bad, a bit heavy on Nina Simone and had Marvin Gaye, who was great but a dude. Nit picking really. Nice work :)
if anyone listens to this before I get a chance, please weigh in on how farty you think this is
https://open.spotify.com/playlist/088WOoTJQ5y2YradJpWAtc?go=...
Just an idea right now, I'll get to it when I can!
This is the perfect project to garner that kind of industry attention, hope it works out!
Example prompt:
"Popular in Canada in 1995"
Not a single Tragically Hip, Alanis Morissette, Sarah McLachlan!
Although my prompt may be too nuanced, some of the example prompts seemed even more so.
You probably mean popular in canada in 1995 and is considered a Canadian band by the Canadian mainstream press. Which should be Weird Al, Moist, Our Lady Peace.. Tragically Hip was never popchart popular until the end. Sarah McLachlan was never mainstream popular until Lilith Fare
i generated a playlist and the first 3 songs were by the same band. I'm not sure how the tracks are ordered but some shuffling of the bands would be nice.
“Radiohead with chillwave”
Track 8: Sandwiches
"tech playa house definitely not dubstep"
and it gave me
dubstep
But love the idea.
Something went wrong :-(
Something went wrong while trying to load this site; please try again later.
Debugging tips
If this is your site, and you just reloaded it, then the problem might simply be that it hasn't loaded up yet. Try refreshing this page and see if this message disappears.
If you keep getting this message, you should check your site's server and error logs for any messages.
Error code: 502-backendSnark aside, great concept; looking forward to trying it when it comes back up.
idk if i'd call myself a designer with the app looking like that haha. not quite Spotify-level. but congrats on shipping, OP :)