Data Science Case Study - AI In Music - Rap Battling Robot

Posted 2019-04-01 Posted by Tom O'Connell

Data Science Case Study: AI in Music - Rap Battling Robot


Founded by Clayton Bunter, Algo-Rhythm were looking to enter an AI into a local rap battle competition to win it. Their CEO had entered several times in his teenage years, never successfully moving past the quarter finals, owing to disqualification by what is defined by the competition’s rules as “choking”. He determined that human’s brains are rarely able to couple wit with speed sufficiently, and that a robot fed his lyrical data and one-liners could utilise machine learning techniques to optimise powerful punchlines quicker than his human brain.

Having designed and built the external shell for his rapping robot in 2012, Bunter sought to bring it to life with an algorithm that could utilise voice cloning text-to-speech technology that could replicate his delivery and style and thus retaining a human-esque demeanour. Thus, Dr Data was born.

To adapt to complex lyrical situations, and the necessity of subjective retort against opponents within the battle sphere, our team implemented a machine learning model, which could identify potential weaknesses in its human opponents, such as “wack clothing” or “stupid hair” and comment accordingly. The model had access to an extensive database of rhyming and near-rhyming words and phrases from one to four syllables, so could produce and execute a line within seconds.

The combination of this with Bunter’s lyrical data ensured the best chance of Dr Data’s progression to the latter rounds of tournaments.


The model analysed other aspects of the battle to learn from its experiences, such as crowd laughter levels, reactions to timing, accent, hand gestures, and word accentuations, allowing itself to adapt to the subjectivity of the audience. It was able to produce content that was received and validated by positive crowd reactions with 92% accuracy.

During an early iteration, Dr Data choked in round three of a regional contest, seemingly affected by Lil Donutz’ comments about his robot girlfriend. In reality, it was a data loading issue, and Dr Data’s RAM was upgraded to prevent this from recurring.

In the quarter finals, Dr Data delivered a line that explicitly declared he was self aware, however, after a long pause and a silent crowd, he followed this up with, “syke!”. This resulted in jubilant cheers from the crowd and became a hallmark of the bot’s personality in later verses.


Below is an excerpt from Dr’s championship winning verse during the ‘Bad Rad Rap Finals.’

“You know not, ‘bout this robot, my flow’s so hot.
Human brains too slow, yeah I take a low shot.
You don’t need a prediction model to know the tide’s turning,
Forget learning, the way I roast you they call me Machine Burning
I’m AI, so I stay calm while you perspire,
I can predict what you say, so why not retire?
You say it’s freestyle, but I know you a liar,
Analysed your historical data, so know you wrote this prior.
Rap hall of fame, you’ll find my initials,
It’s got to be official, the future of hip-hop is artificial.
Can’t believe how this all unfurled,
Come a long way since I first learnt ‘Hello World’”

Happy April Fools!

Get priority access to Pivigo news, features, events and networking opportunities