What it does

The project generates rap lyrics imitating the style of a specified rapper. The user asks the Google Home to rap in the style of a certain artist, and voila Google Home is spitting bars with some dank beats. To know whether or not Google Home can rap like a specific artist, users can ask our app whether or not it knows a specific artist - don’t worry, it knows all the most popular ones.

How I built it

For our project to work with Google Home and Google Assistant, we created an Action on Google and used Google DialogFlow to generate responses while the user interacts with our Action. Whenever the user speaks to our app, a request is sent to and processed by our Heroku website, which runs on a Node.JS backend. The backend can create a response to welcome the user, to ask for the user to repeat what they said, to confirm whether or not it knows a rapper, and finally, to generate a rap based on a known rapper’s style. The Node.JS calls Python scripts to determine what artists our data knows and to generate raps similar to specific artists. The text generator reads text from the csv and produces a probability distribution using tri-grams. In essence, the text generator seeks to predict the next word given the 2 previous words. Using a weighted sample based on the probability distribution, we were able to emulate the lyrics of famous rappers.

Challenges I ran into

Putting our lyrics data in a format that can be quickly used and retrieved by our app.

Accomplishments that I'm proud of

We are particularly proud of the hot fire that SickoCode can spit - the conglomeration of an artist’s lyrical list into a “Frankenstein” of a bar was one of the most impressive moments of the night. The addition of a beat in the back tied the project together, giving the NLP-generated rap some flow and bounce to dance to.

What I learned

I learned how to make a Google Home skill and connect it to a backend server. I also learned how to use Git properly and Heroku to host. - Tim I learned that you can generate and how to generate lyrics using NLP. I didn’t think we would find much success since lyric generation is a creative process, which is generally difficult for computers to mimic. - Josh I learned how to use python nltk with a node server, which, though complicated, was quite useful as python is much more suited to these things than js. - Quinn

What's next for SICKO CODE

We hope to add a “Rap about …” feature to SickoCode, generating a rhyming rap based on a subject given by the user. We are also looking forward to implementing a login and database to store generated raps, which can be seen on our website sickocode.com. We want to optimize our NLTK algorithm to generate raps on the fly rather than generation before anything is run. In addition, we will be looking for data sets with a wider selection of artists.

Built With

Share this project:

Updates