Environmental Sound Classification on the UrbanSound8K Dataset
Switch branches/tags
Nothing to show
Clone or download
Latest commit 24e8185 Dec 15, 2017


Environmental Sound Classification

Author: Bhavika Tekwani
Dataset Source: https://serv.cusp.nyu.edu/files/jsalamon/datasets/UrbanSound8K.tar.gz


  1. constants.py: Contains various settings for our CNNs & the filepaths for the dataset & pickled numpy arrays.
  2. create_rep.py: Creates the 2-channel representation of the audio signals. Generates 4 NumPy arrays and stores them in the output folder as pickled .npy objects. These pickles represent the train features, train labels, test features & test labels.
  3. explore.py: Generates samples and visualizes them using a visualizer in librosa. These are utility functions which aided the creation of graphs & statistics for the report. No pseudocode provided for this file.
  4. cnn.py: Contains the Tensorflow model definition of the 1 layer CNN (referred to as CNN-1 from now on).
  5. sbcnn.py: Contains the Keras model for the Salamon & Bello CNN architecture.
  6. output/results.txt: Contains a summary of results which are used in the slides & report.

To install all the required modules to run the 5 files listed above, run the following line within the UrbanSound folder. You must have Python 3 installed. By default, we are using Tensorflow & Keras without GPU support.

pip install -r requirements.txt

Other files:

  1. pseudocode: This folder contains the pseudocode for each of the above source files with the same name.
  2. Environmental Sound Classification.pdf: Summary of idea, methods, results & references.
  3. UrbanSound8K.pdf: Slides.
  4. output: This folder will contain 4 .npy files after create_rep.py has run.