Git Product home page Git Product logo

environmental-sound-classification's Introduction

Environmental-Sound-Classification

Environmental-Sound-Classification using ESC-10 dataset

Dependencies

  1. Python
  2. Keras
  3. Librosa
  4. sounddevice
  5. SoundFile
  6. scikit-learn

Dataset

Uses ESC-10 dataset for sound classification. It is a labeled set of 400 environmental recordings (10 classes, 40 clips per class, 5 seconds per clip). It is a subset of the larger ESC-50 dataset.

Setup

In this repository, I trained Convolution Neural Network, Multi Layer Perceptron and SVM for sound classification. I achieved classification accuracy of approx ~80%. MFCC (mel-frequency cepstrum) feature is used to train models. Other features like short term fourier transform, chroma, melspectrogram can also be extracted.

The dataset is downloaded and is kept inside "dataset" folder. It has 10 different classes each containing 10 .ogg files. You can visualize the dataset by running visualize_data.py. This script takes a .ogg file as input and converts it into .wav form. The waveform is visualized in the form of a plot.

python visualize_data.py -o "dataset/001 - Dog bark/1-30226-A.ogg"

A sample wav file for each class has been generated and kept within sample_wav folder for reference.

To train and classify, execute main.py as -

python main.py cnn  // for training CNN
python main.py mlp  // for training MLP
python main.py svm  // for training SVM

Internally main.py uses extract_features.py and nn.py (or svm.py) to create and train model.

Once training is done, the trained models are automatically saved in h5 format.

Wave plot for class - baby

sample_waveplot_baby

Wave plot for class - dog

sample_waveplot_dog

environmental-sound-classification's People

Contributors

apoorva-dave avatar

Watchers

 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.