Coder Social home page Coder Social logo

audio-classification's Introduction

Environmental Sound Classification using Deep Learning

A project from Digital Signal Processing course

Dependencies

  • Python 3.6
  • numpy
  • librosa
  • pysoundfile
  • matplotlib
  • scikit-learn
  • tensorflow
  • keras

Dataset

Dataset could be downloaded at Dataverse or Github.

I'd recommend use ESC-10 for the sake of convenience.

Example:

├── 001 - Cat
│  ├── cat_1.ogg
│  ├── cat_2.ogg
│  ├── cat_3.ogg
│  ...
...
└── 002 - Dog
   ├── dog_barking_0.ogg
   ├── dog_barking_1.ogg
   ├── dog_barking_2.ogg
   ...

Feature Extraction

Put audio files (.wav untested) under data directory and run the following command:

python feat_extract.py

Features and labels will be generated and saved in the directory.

Classify with SVM

Make sure you have scikit-learn installed and feat.npy and label.npy under the same directory. Run svm.py and you could see the result.

Classify with Multilayer Perceptron

Install tensorflow and keras at first. Run nn.py to train and test the network.

Classify with Convolutional Neural Network

  • Run cnn.py -t to train and test a CNN. Optionally set how many epochs to train on.
  • Predict files by either:
    • Putting target files under predict/ directory and running cnn.py -p
    • Recording on the fly with cnn.py -P

audio-classification's People

Contributors

mvrozanti avatar imfing avatar micah5 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.