Whether we enjoy it or not, hip-hop plays a huge role in our daily lives. From hearing some form of hip-hop at public places like malls, carnivals, etc, to our prior president playing Chance the Rapper at his Christmas party. One of our favorite categories of hip-hop is freestyle, which is also considered to be very difficult to master. We wanted to develop an AI that could learn how to master the art of freestyle hip-hop from different eras.
What it does
The Notorious A.lexa uses deep learning and a recurrent neural network to generate hip hop lyrics based on patterns and rhyming schemes of a specified era.
Recurrent Neural Network
- 4 layers 4 lstms
- Recognizes rhyme patterns, word frequency, sentence length/structure, etc.
- Recognize the patterns of words in each era based on the data
- The number of training data points (lines) for modern, two-thousands, and 90's were 30,000, 20,000, and 20,000 respectively.
- Developed a web scraper, using beautiful soup library, to get song lyrics to hip-hop songs.
- Cleaned the data to get rid of punctuation marks, and other unnecessary text that would confuse the learning algorithm.
- We selected the top 50 rap albums for 2010s, 2000s, 1990s.
How we built it
- Our original model was based off robbiebarrat’s deep learning algorithm that was trained with Kanye West lyrics and produced songs based on the hip-hop styles of the legendary artist. https://github.com/robbiebarrat/rapping-neural-network.
- We changed the model to better handle our training data, which had much more variety in terms of the lyrics.
- We fed our model the lyrics of popular songs from the 3 eras previously stated, and after training, each model was properly outputting lyrics that were similar to those from the songs of its respective era.
Challenges we ran into
- Neural network accuracy
- Amazon Alexa API
Accomplishments that we're proud of
The whole project is one big achievement for us and seeing all of the intricate puzzle pieces fit together into this unique and funny project is something we are extremely proud of.
What we learned
- How to efficiently scrape data from the web and clean that data so it can be used in machine learning.
- How to use a preexisting neural network architecture and modify it to fit our specifications.
- New songs from different eras of hip-hop
- How the rhyming scheme and syllable count play key roles in the production of hip-hop music.
What's next for The Notorious A.lexa
We plan to continue to tweak and try to make the neural network better. We also would like to create an AI similar to this on other music genres like country or pop.