Skip to content
A module to classify audio samples.
Jupyter Notebook Python Shell
Branch: master
Clone or download
ignacio
ignacio rename tests
Latest commit 42529c6 Oct 3, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
audioclas rename tests Oct 3, 2019
data first commit Aug 28, 2019
docker first commit Aug 28, 2019
docs first commit Aug 28, 2019
etc
models first commit Aug 28, 2019
notebooks first commit Aug 28, 2019
references first commit Aug 28, 2019
reports first commit Aug 28, 2019
.dockerignore first commit Aug 28, 2019
.gitignore
Jenkinsfile
LICENSE first commit Aug 28, 2019
README.md
requirements.txt
setup.cfg first commit Aug 28, 2019
setup.py first commit Aug 28, 2019
test-requirements.txt first commit Aug 28, 2019
tox.ini first commit Aug 28, 2019

README.md

DEEP Open Catalogue: Audio classifier

Build Status

Author/Mantainer: Ignacio Heredia (CSIC)

Project: This work is part of the DEEP Hybrid-DataCloud project that has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No 777435.

This is a plug-and-play tool to perform audio classification with Deep Learning. It allows the user to classify their samples of audio as well as training their own classifier for a custom problem. The classifier is currently pretrained on the 527 high-level classes from the AudioSet dataset.

You can find more information about it in the DEEP Marketplace.

demo

Installing this module

Local installation

Requirements

  • It is a requirement to have Tensorflow>=1.12.0 installed (either in gpu or cpu mode). This is not listed in the requirements.txt as it breaks GPU support.
  • This project has been tested in Ubuntu 18.04 with Python 3.6.5. Further package requirements are described in the requirements.txt file.

To start using this framework run and download the default weights:

git clone https://github.com/deephdc/audio-classification-tf
cd audio-classification-tf
pip install -e .
curl -o ./models/default.tar.gz https://cephrgw01.ifca.es:8080/swift/v1/audio-classification-tf/default.tar.gz
cd models && tar -zxvf default.tar.gz && rm default.tar.gz 

To use this module with an API you have to install the DEEPaaS package (temporarily, until 1.0 launching, you will have to use the test-args branch):

git clone -b test-args https://github.com/indigo-dc/deepaas
cd deepaas
pip install -e .

and run deepaas-run --listen-ip 0.0.0.0. Now open http://0.0.0.0:5000/ and look for the methods belonging to the audioclas module.

Docker installation

We have also prepared a ready-to-use Docker container to run this module. To run it:

docker search deephdc
docker run -ti -p 5000:5000 deephdc/deep-oc-audio-classification-tf

Now open http://0.0.0.0:5000/ and look for the methods belonging to the audioclas module.

Train an audio classifier [in progress ]

You can train your own audio classifier with your custom dataset. For that you have to:

Test an audio classifier

There are two possible ways to use the PREDICT method from the DEEPaaS API:

  • supply to the data argument a path pointing to a (signed 16-bit PCM) wav file containing your audio.
  • supply to the url argument an online url pointing to a (signed 16-bit PCM) wav file containing your audio. Here is an example of such an url that you can use for testing purposes.

Acknowledgments

The code in this project is based on the original repo by IBM, and implements the paper 'Multi-level Attention Model for Weakly Supervised Audio Classification' by Yu et al.

The main changes with respect to the original repo are that:

  • we have addded a training method so that the user is able to create his own custom classifier
  • the code has been packaged into an installable Python package.
  • it has been made compatible with the DEEPaaS API.

If you consider this project to be useful, please consider citing any of the references below:

You can’t perform that action at this time.