๐Ÿ“ฆ wrussell1999 / royal-hackaway-v2

๐ŸŽค RapGod - Build custom raps over SMS and phone calls!

โ˜… 2 stars โ‘‚ 0 forks ๐Ÿ‘ 2 watching
nexmonlptts
๐Ÿ“ฅ Clone https://github.com/wrussell1999/royal-hackaway-v2.git
HTTPS git clone https://github.com/wrussell1999/royal-hackaway-v2.git
SSH git clone git@github.com:wrussell1999/royal-hackaway-v2.git
CLI gh repo clone wrussell1999/royal-hackaway-v2
Will Russell Will Russell Update README.md a32d7c9 6 years ago ๐Ÿ“ History
๐Ÿ“‚ a32d7c92d3ef63d1eea86eaf3843ff1c1e742531 View all commits โ†’
๐Ÿ“ caller
๐Ÿ“ config
๐Ÿ“„ .gitignore
๐Ÿ“„ README.md
๐Ÿ“„ requirements.txt
๐Ÿ“„ supreme.mp3
๐Ÿ“„ README.md

Rap God

Rap God is our creation from Royal Hackaway.

We won the Nexmo Prize (best use of their API) and best audio hack.

After being inspired by a friend's creation of a rap bot, we decided to build a bot that could alter existing rap songs to be about new topics. Then, of course, we needed a way to access the bot, and we wanted to do something with the Nexmo API, so we decided that we would interface with it using texts and phone calls.

Tools

The entire project is built in python. We've used quite a few libraries, including:

  • flask (for building a web server)
  • nexmo (for interfacing with the nexmo platform)
  • nltk (natural language processing)
  • tswift (for fetching song lyrics)
  • google-cloud-texttospeech (for text-to-speech)
  • pydub (for layering 2 MP3 files ontop of eachother)

Team

Our team was just two people,

Installation

To install:

$ git clone https://github.com/jedevc/royal-hackaway-2019.git
$ cd royal-hackaway-2019
$ virtualenv .env
$ source .env/bin/activate
$ pip install -r requirements.txt

Before you can run, ensure that you have created the required files for the Nexmo API and the Google Cloud Platform so that you can access their APIs.

To run:

python3 -m caller

...

Technical details

Using the Nexmo API, we get the user to text our bot using SMS with the theme they'd like to use for their own rap. Then, we select a random song from our list of songs to use as a base. We then use NLP to tag the song and to modify it so that we replace some of the nouns with our desired subject, effectively changing what the song is about.

The result is then sent back to the user. This is done with a phone call, where the rap is sung back to them using a text-to-speech program.