<aside> 💡 This is the methodology for analysis of comedy in Friends, the TV Show. If you haven't read the post, go ahead of click here


As I said in my original post, I analyzed the laughter in each episode. You know those short clips of laughter you hear after a funny scene. They are either from a live audience or are pre-recorded (called canned laughter). Those short clips of laughter were in most 80s and 90s sitcoms, and luckily, Friends has one of those.

That clip of laughter here is how we define "funny" for this analysis.

The overarching question we are trying to answer here: When did a laugh happen? And who was speaking just before it?

This tells you what character prompted the laugh.

Here's a summary of what I did:


I did step #4 in Python while the rest were either done manually or in R.

To explain step #4 a little bit more, I used the librosa library in python to create an mfcc.) representation of the sound waves for one second of audio. This transforms the audio file into a dataset of sound wave frequencies where each row represents one second in the audio file and each column represents an mfcc. I opted for 40 mfcc so there are 40 columns in the dataset. Here's what it looks like:


The laughter prediction model is shockingly accurate. The accuracy is about 98% with a 95% precision (precision means that when the model says it's laughter, there's a 95% chance that it is correct).

As you can see, we get both the script and subtitle data for steps #6 and #7, and you might be wondering why. Recall the question we need to answer is when the laughter happened and who was speaking before.