Disclosure: I may earn affiliate revenue or commissions if you purchase products from links on my website. The prospect of compensation does not influence what I write about or how my posts are structured. The vast majority of articles on my website do not contain any affiliate links.

I love rap music. Chances are, you do too. With the popularization of Genius, we now have a crowdsourced library of not only song lyrics, but also the meaning behind those lyrics sometimes provided by the artists themselves. This is a huge improvement from the AZLyrics of ten years ago where one guy would try his hand at transcribing a song during his first play through.

Now that definitive transcriptions of entire discographies are commonplace, we can programmatically seek insights from this data. My favorite example is The Largest Vocabulary in Hip Hop. In it, Matt Daniels counts the number of unique words in a variety of rappers’ first 35,000 lyrics listed on RapGenius. From there, he places each rapper on a scatter plot against benchmarks like Moby Dick and Shakespeare. DMX was dead last (3,214 unique words), and Aesop Rock was first (7,392 unique words)- though the extremes didn’t surprise anybody, this stands as one of the most important utilizations of Genius to date.

In detailing his methodology, Daniels mentions how difficult it is to transcribe the slang of Hip-Hop. In the past, I’ve worked with formulas for readability of text, such as Dale-Chall, but what about clarity of spoken word? You can understand what some artists are saying better than others. Can we measure clarity of rap songs?

By clarity, I’m talking about ease of transcription- what we hear on an early listen versus what the lyrics actually are. A song’s use of slang, complexity of words, speed of rapping, accent, and enunciation all factor in. For example, if you take out a pen and paper, it’s pretty easy to jot down the lyrics from Will Smith’s Summertime. Kendrick Lamar’s Look Out for Detox? Not so much.

To start my project, I needed a benchmark to measure against. The lyrics on RapGenius are near 100% correct, down to the spelling and punctuation. This serves as a perfect control. Next, I needed an imperfect transcription to compare. One solution would be to commission a study where 100 people listen to a song for the first time while scribbling down their interpretation of the lyrics. Another is to use the IBM Watson Speech to Text API. I can compare the robot’s attempted transcription to the actual lyrics in order to roughly determine clarity. Watson is better than humans because it isn’t biased toward specific artists, styles, time periods, or regions. While I can understand artists from Philadelphia better as a result of having grown up around people who talk that way, I have more trouble understanding rappers from the south.

Modern speech to text programs have one major flaw when it comes to music: they can’t differentiate between the artist’s lyrics and the instrumental. For example, here’s the transcription of Lupe Fiasco’s Thank You Freestyle:

Fineness nndb nndb nndb nndb nndb nndb nndb nndb nndb nndb nndb nndb nndb nndb nndb nndb nndb nndb nndb.

You might be thinking “Oh well if it’s so hard then how does Shazam recognize a song in three seconds?” Those apps use a technique known as acoustic fingerprinting. It has nothing to do with lyric recognition, rather, trying to match the digital signature of a sound sequence to a known song. There is a function in Audacity that allows splitting the verses from the instrumental, but it results in a massive quality loss, and would be too complicated to implement programmatically. Instead, we’ll focus on a cappella tracks- vocals without a backing instrumental. The difficulty here is that, since records aren’t a thing anymore, a cappella tracks aren’t widely distributed. Looks like we’ll have to go back to the nineties.

The B side of a record typically contained instrumental and a cappella tracks which were of great interest to DJs
The B side of a record typically contained instrumental and a cappella tracks which were of great interest to DJs


I’m going to go with the a cappella for Biggie Smalls’ Juicy. It’s a well-known song and, though a bit profane, will be fun to test Watson on. Here are the lyrics:

Rap Genius Juicy Lyrics

Yeah, this album is dedicated
To all the teachers that told me I’d never amount to nothing
To all the people that lived above the buildings that I was hustling in front of
That called the police on me when I was just trying to make some money to feed my daughter
And all the niggas in the struggle
You know what I’m saying? It’s all good, baby baby

[Verse 1] It was all a dream, I used to read Word Up! magazine
Salt-n-Pepa and Heavy D up in the limousine
Hangin’ pictures on my wall
Every Saturday Rap Attack, Mr. Magic, Marley Marl
I let my tape rock ’til my tape popped
Smoking weed on Bambu, sippin’ on Private Stock
Way back, when I had the red and black lumberjack
With the hat to match
Remember Rappin’ Duke? Duh-ha, duh-ha
You never thought that hip hop would take it this far
Now I’m in the limelight cause I rhyme tight
Time to get paid, blow up like the World Trade
Born sinner, the opposite of a winner
Remember when I used to eat sardines for dinner
Peace to Ron G, Brucey B, Kid Capri
Funkmaster Flex, Lovebug Starski (wassup?)
I’m blowing up like you thought I would
Call the crib, same number, same hood (that’s right)
It’s all good (it’s all good)
And if you don’t know, now you know, nigga

[Verse 2] I made the change from a common thief
To up close and personal with Robin Leach
And I’m far from cheap, I smoke skunk with my peeps all day
Spread love, it’s the Brooklyn way
The Moet and Alizé keep me pissy, girls used to diss me
Now they write letters cause they miss me
I never thought it could happen, this rappin’ stuff
I was too used to packing gats and stuff
Now honeys play me close like butter play toast
From the Mississippi down to the East Coast
Condos in Queens, indo for weeks
Sold out seats to hear Biggie Smalls speak
Living life without fear
Putting 5 carats in my baby girl’s ear
Lunches, brunches, interviews by the pool
Considered a fool cause I dropped out of high school
Stereotypes of a black male misunderstood
And it’s still all good
Uh, and if you don’t know, now you know, nigga

[Verse 3] Super Nintendo, Sega Genesis
When I was dead broke, man, I couldn’t picture this
50-inch screen, money green leather sofa
Got two rides, a limousine with a chauffeur
Phone bill about two G’s flat
No need to worry, my accountant handles that
And my whole crew is lounging
Celebrating every day, no more public housing
Thinking back on my one-room shack
Now my mom pimps a Ac with minks on her back
And she loves to show me off of course
Smiles every time my face is up in The Source
We used to fuss when the landlord dissed us
No heat, wonder why Christmas missed us
Birthdays was the worst days
Now we sip champagne when we thirsty
Uh, damn right I like the life I live
Cause I went from negative to positive
And it’s all… (It’s all good)
And if you don’t know, now you know, nigga

 

After running the a cappella through Watson, here’s what I got (I formatted the text into verses):

 

Watson 1.0x Juicy Lyrics

Yeah this is not how dedicated
for the future that’s only another amounts of money
for the people that lived above the buildings that house house the phone
to call the police on when I was trying to make some money to be my daughter.
It’s all my peoples of the struggle
you know Sir so good be remeber.

[Verse 1] It was all a dream I used to read word up magazine
salt pepper and heavy duty up in the limousine
Hangin pictures on my goal
every Saturday rap attack Mr magic Marley mall
Unnao probably stop

way back when I had the red and black lumberjack
with the hat so Matt
remember Rappin Duke duh ha doneness
would take it this fall
metal men the limelight because the website
dnmt like the world trade
born sinner the opposite of a winner
remember when I used to eat sardines for dinner
peace abroad secrecy project approach
both left the flex lovebug Starsky
I’m Blowin up like you thought I would
call the crib same number same hood it’s all good. All.
And if you don’t know mad you know neko own.

[Verse 2] I made the change from a common thief
thought the personal with robin leach
and I’m far from cheap dnmt
spread love this Brooklyn way
below what I was very cheap because the girl who’s the best me

lullaby lettuce but they miss me
I never thought I could happen with weapons stuff
I was used for packing got some stuff
now but with what we call slide but it went well
from the Mississippi Delta but you call
condo the queen and don’t for weeks
fallout fix the Hibiki small speak.
Live a life without fail
put vannatter
luncheon brokenness understood and still all good all.
And if you don’t know baguette old mega

[Verse 3] super Nintendo Sega Genesis
one album that approach better could picture the
fitting in screen my grandmother thoughtful
got to rob the little thing with the snowfall
phone bill about to just flat
not need the OneNote
celebrate every day no more public housing
thinking back on my one room shack
mama Malpensa what makes on the back.
If you love the song we all of course
smile that we come up if you stop in the fall
we use the fuss when the mainboard discussed
no he wondered why Christmas miss stuff
birthdays was the worst days
that we took a step family Thursday
off-again negative the positive then fall.

And if you don’t know now I didn’t know who may go on. I don’t own. And if you don’t know now you know ****.

 

It’s an impressive result especially when you consider that Watson is trying to form sentences, not parse a rap song. To try to get a clearer translation, I decreased the tempo of the song by 20% and ran it through Watson again.

Screen Shot 2016-06-16 at 3.33.13 PM

Watson 0.8x Juicy

Yeah this is a problem dedicated
full of the teachers that told me another woman outside
not. Full of people that lived above the buildings that house hustler for
Nicole upholding song when I was trying to make the money to be my daughter.
So more people super strong
you know square so good baby bay Cuba.

[Verse 1] It was all a maturing
Unni Helena
pictures from a bowl
every thought of that rap attack Mr magic Marley mall
Unna thought
way back when I had the red and black lumberjack
with the hat cement block
alright we’ll do the hard the hog
dnmt would take it this fall
madwoman nnat nnat nnat nnat
Paul left the flex lovebug Starsky.
A blow or not my kids thought I would
call the crib same number same hood it’s all good. All.
And if you don’t know old man you know neko owned.

[Verse 2] I’m very little change from a common thief
to up close and personal with robin leach
ad spread love this Brooklyn way
the mobile OneNote the girl to the death of me
louder but love this but they missed me
Unna can happen Rathmann stop.
I will use the packing Jackson stuff
now OneNote from the Mississippi Delta but you call
Carbonneau the queen and bell we’ve.
Fallout freaks they have a pretty small speak.
Live a life without fear
nnj munchkin brokenness understood. And it’s still all good all. And if you don’t know targeted old medical

[Verse 3] super Nintendo Sega Genesis
one by one bit of brokenness.
The N. screenname. Ennoblement sack
mama mall what links on the back.
If you love the song we all love all
smiles nnj
we use the past when the mainboard this must
know he wondered why Christmas missed plus.
Birthdays one of the worst days
that we took a step family Thursday
off-again. And if you don’t know now I didn’t know who may go on. All along. And if you don’t know now you know miko. I own. And if you don’t know that I didn’t know medical representative beads haven’t how. Junior mafia math reading. On. Well. Yeah. I.

 

As it turns out, the regular-speed version produced a clearer transcription than the slightly-slowed-down version. My guess is that the slowness further confused Watson. Below are graphic diffs showing changes between the original and the two attempts by Watson.

Difference between actual lyrics and transcription 1

Difference between actual lyrics and transcription 2

Now that we know that Watson gives us something to work with and that there are plenty of songs begging to be tested, the next step will consist of me determining a programmatic way of retrieving lyrics for a song I provide, using Watson to transcribe the lyrics, and then calculating the clarity of the song using an algorithm that I develop. Stay tuned for part two!

Measuring Rap Lyric Clarity Part 1