Coder Social home page Coder Social logo

watchmyset's Introduction

watchmyset

The goal of this project was to create a laughter detector for stand-up comedy sets, such that it can statistically breakdown the number of laughs in a set, percentage of laughs, and plot the timepoints where a comedian got laughs. Since I'm interested only in the laughter of a crowd (I don't want the detector to label a single guy chuckling in the middle of a joke as a laugh), it differs a little from existing laugh detectors.

plot

The above plot is detected laughs in a Tonight Show set by Mark Normand

To create this stand-up comedy set laugh detector, I trained a recurrant neural network on around ~20 stand-up comedy sets available on YouTube. These sets were chunked into 1 second .wav files, totalling about ~6000 .wav files, and hand-labeled for whether there was laughter. Each second was converted into its Mel-frequency Cepstral Coefficient (MFCC), essentially a mathematical transformation that converts a noisy .wav into a 99x13 set of features that somewhat approximates the way that the human ear breaks down sound. I then trained my RNN on this data.

This trained model can then be used to reasonably detect laughter in stand-up comedy sets it hadn't been trained on. During training it reaches an accuracy of ~92-93%, with most of the missed classifications being at the beginnings/ends of laughs, which for the purposes of this project does not matter so much (I'm more concerned with catching generally where the laughs are, less so the precise time a laugh begins/ends). More practically, I used the above Tonight Show set as sort of a 'test set,' where it successfully detects every laugh.

The model was initially trained using code written on Google Colaboratory.

The Google Colab notebook for training the model is located in this repo, named WMS_train_model.ipynb. (Suggested to open in Colab)

The Google Colab notebook for detecting laughter in YouTube videos is located in this repo, named WMS_predict_YT.ipynb. (Suggested to open in Colab).

The dataset the model was trained can be downloaded here: https://drive.google.com/open?id=1hyINuRXl6QXOPwLZIDjNbThiTsCxOMpv

And the labeled CSVs corresponding to the above dataset can be downloaded here: https://drive.google.com/open?id=1cTRqzzFFzoC9QgOZ5OKecSgf8ROar5c7

Using this model, I also am creating a basic website allowing easy use of the trained model to detect laughs in stand-up comedy set. wms.py is a slightly more developed version of the above predict notebook, and app.py is the web server that using Flask microframework. The templates folder contains a basic HTML UI for users to paste a YouTube link and see the laughter statistics. Currently all code is working for a local development server.

watchmyset's People

Contributors

dbasrai avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.