Skip to content

devicehive/devicehive-audio-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License

Devicehive Audio Analysis

Audio classification feature demo
Detailed description can be found here

Installation

  • Get a copy of this repo
  • Install system packages
sudo apt-get install libportaudio2 portaudio19-dev
  • Install python requirements
pip install -r requirements.txt
  • Download and extract saved models to source directory
wget https://s3.amazonaws.com/audioanalysis/models.tar.gz
tar -xzf models.tar.gz

Running

To process prerecorded wav file

run

python parse_file.py path_to_your_file.wav

Note: file should have 16000 rate

To capture and process audio from mic

run

python capture.py

It will capture and process samples in a loop.
To get info about parameters run

python capture.py --help

To start web server

run

python daemon.py

By default you can reach it on http://127.0.0.1:8000
It will:

  • Capture data form your mic
  • Process data
  • Send predictions to web interface
  • Send predictions to devicehive

Also you can configure your devicehive connection though this web interface.

Useful info

To train classification model next resources have been used:

You can try to train model with more steps/samples to get more accuracy.