Training a neural network to generate song-lyrics using a number of curated datasets containing lyrics from music artists.
by Alex Pinette, Milo Lani-Caputo, and Tamsin Rogers
View our blog post about this project HERE
Using Genius, and Spotify Web APIs, we are able to get song lyrics as well as playlist and artist data.
First:
git clone https://github.com/alexpinette/Bars.ai.git
Then you are going to need to install the required libraries:
pip install -r requirements.txt
-
Follow the instructions on Genius API Documentation to get your own client_id, client_secret, and client_access_token.
-
Then create a
genius_config.py
file with variables for yourclient_id
,client_secret
, andclient_access_token
.
-
Follow the instructions on Spotify API Documentation to get your own client_id, client_secret.
-
Then create a
spotify_config.py
file with the variables for yourSPOTIPY_CLIENT_ID
, andSPOTIPY_CLIENT_SECRET
.
-
Open the
data_generation_spotify
ordata_generation_genius
notebook. -
Enter a playlist/album URL in the allocated variable for
data_generation_spotify
. -
Or, enter an artist name in the allocated variable for
data_generation_genius
. -
Other options are to choose from the already created datasets.
-
Open the
model_generation_and_training
notebook. -
Input the currated .csv file in the associated variable.
-
Run the notebook.
-
Open the
lyric_generation
notebook. -
Update the associated variables with the correct dataset, and model.
-
Create your own or allow the script to randomly generate a seed.
-
Run the notebook.