

The pre-trained model of textgenrnn utilizes two 128 cell long-short-term-memory (LSTM) recurrent layers. Recurrent neural networks are particularly advantageous with sequence-based data - like text - because they don’t rely upon mapping a fixed size input size to a fixed size output and they use previous outputs to be used as inputs. To do this, we employed textgenrnn, a python module built on Keras/TensorFlow that generates text with RNNs. We wanted to take advantage of transfer learning for our model - applying another model’s “knowledge” to our own so we’d save some time and wouldn’t need to start from scratch. We collected 10,000 playlist titles and a list of their tracks. To collect our data, we used the spotipy wrapper to work with Spotify’s Web API. Specifically, we wanted to train a recurrent neural network to generate new playlist titles at random, and then explore whether we could generate playlist titles based on the songs in the playlist. We were interested in exploring the underlying patterns and nuances from human language that go into the creation of these playlist titles via the magic of neural networks.


For the most part, playlist titles are influenced by the tracks within the playlist, albeit to varying degrees. Have you ever wondered how people categorize and come up with names for their Spotify playlists? Some people stick with the typical playlist names like “Running,” “Party Music,” “Songs for a Rainy Day,” and “Studying.” Other titles can be more creative, like a salsa playlist called “Chips and Salsa” or a playlist with inspiring songs by strong female artists called “Empowered Women Empower Women.” And we’ve all seen playlist titles that seem completely random and probably have no meaning to a stranger, such as “That Day in Copenhagen” or “Recurrent Neural Networks” (yes, that’s real!).

Generating Spotify Playlist Titles with a Little Help from RNNs
