Wilson's Deep Playlist Generator provides a pipeline for generating beautiful sequences of tracks. The generator uses a Recurrent Neural Network to learn the patterns used by playlist curators and artists to build playlists. The default model is trained on all volumes from the Wilson's Morning Wake Up series on Spotify.
To listen to the fruits of this project's labour, head on over to the playlist at this link
If you would like to listen to the original playlist, you can find it here too.
- Create virtual environment
conda env create --file local_env.yml
- Activate and deactivate environment
conda activate local_wmw
conda deactivate
- Add environment/kernel to Jupyter Notebook if you'd like to explore a little.
python -m ipykernel install --user --name=local_wmw
- Install latest PyTorch for local and cpu only
conda install pytorch torchvision cpuonly -c pytorch
- Head on over to Spotify for Developers and setup an app. Spotify will then supply an ID and Secret for accessing your app. Store these in your own .env file in the root of the directory like so:
# example .env file
SPOTIFY_EMAIL=hello@example.com
SPOTIPY_CLIENT_ID=XXX
SPOTIPY_CLIENT_SECRET=XXX
SPOTIPY_REDIRECT_URI=http://localhost:8080
CACHE=.spotipyoauthcache
# Modeling info
MODEL_DIR=models
MODEL_CHOICE=lstm_model.pth
SCALER_CHOICE=standard_features.pkl
PCA_CHOICE=dim_red.pkl
To generate a playlist, run the following commands in the the command line whilst in the root of the repo:
conda activate local_wmw
# First generate a playlist pool
python get_playlist_pool.py
# Then generate a playlist
python main.py
A single playlist takes around 10 minutes to generate.