0% found this document useful (0 votes)
449 views

GitHub - Tyiannak - pyAudioAnalysis - Python Audio Analysis Library - Feature Extraction, Classification, Segmentation and Applications

pyAudioAnalysis is a Python library for audio analysis tasks including feature extraction, classification, segmentation, and applications. It allows users to extract audio features, classify unknown sounds, perform supervised and unsupervised segmentation, and more. The library provides wrappers to execute analysis tasks with example code showing training a classifier on folders of audio files and classifying an unknown file. It has dependencies that can be installed via pip and supports both Python and command line usage.

Uploaded by

Riyaz Shaik
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
449 views

GitHub - Tyiannak - pyAudioAnalysis - Python Audio Analysis Library - Feature Extraction, Classification, Segmentation and Applications

pyAudioAnalysis is a Python library for audio analysis tasks including feature extraction, classification, segmentation, and applications. It allows users to extract audio features, classify unknown sounds, perform supervised and unsupervised segmentation, and more. The library provides wrappers to execute analysis tasks with example code showing training a classifier on folders of audio files and classifying an unknown file. It has dependencies that can be installed via pip and supports both Python and command line usage.

Uploaded by

Riyaz Shaik
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

9/21/2019 GitHub - tyiannak/pyAudioAnalysis: Python Audio Analysis Library: Feature Extraction, Classification, Segmentation and Applications

tyiannak / pyAudioAnalysis

Dismiss
Join GitHub today
GitHub is home to over 40 million developers working together to host and
review code, manage projects, and build software together.

Sign up

Python Audio Analysis Library: Feature Extraction, Classification, Segmentation and Applications

489 commits 1 branch 0 releases 8 contributors Apache-2.0

Branch: master New pull request Find File Clone or download

tyiannak Merge pull request #224 from fredrike/fix … Latest commit 68e5859 on Aug 5

pyAudioAnalysis fix missed " 6 months ago

tests code refactoring last year

.gitignore gitignore update last year

LICENSE.md UPDATEs: (1) mlpy replaced by sklearn in PCA, LDA and SVM (2) hmm tra… 3 years ago

README.md Update README.md 10 months ago

icon.png Revert "Add setup.py to allow `pip install -e git+https://...`" last year

setup.py version update last year

README.md

A Python library for audio feature


extraction, classification,
segmentation and applications
This doc contains general info. Click here for the complete wiki

News
Latest pyAudioAnalysis update [2018-08-12] now compatible with Python 3
Check out pyVisualizeMp3Tags a python script for visualization of mp3 tags and lyrics
Check out paura a python script for realtime recording and analysis of audio data
PLOS-One Paper regarding pyAudioAnalysis (please cite!)
Checkout the tutorial library for the course "Multimodal Information Processing & Analysis" of the MSc in Data Science
in NCSR Demokritos

General
pyAudioAnalysis is a Python library covering a wide range of audio analysis tasks. Through pyAudioAnalysis you can:

Extract audio features and representations (e.g. mfccs, spectrogram, chromagram)


https://github.com/tyiannak/pyAudioAnalysis 1/3
9/21/2019 GitHub - tyiannak/pyAudioAnalysis: Python Audio Analysis Library: Feature Extraction, Classification, Segmentation and Applications

Classify unknown sounds


Train, parameter tune and evaluate classifiers of audio segments
Detect audio events and exclude silence periods from long recordings
Perform supervised segmentation (joint segmentation - classification)
Perform unsupervised segmentation (e.g. speaker diarization)
Extract audio thumbnails
Train and use audio regression models (example application: emotion recognition)
Apply dimensionality reduction to visualize audio data and content similarities

Installation
Install dependencies:

pip install numpy matplotlib scipy sklearn hmmlearn simplejson eyed3 pydub

Clone the source of this library:

git clone https://github.com/tyiannak/pyAudioAnalysis.git

Install using pip:

pip install -e .

(also works with pip3 now)

An audio classification example


More examples and detailed tutorials can be found at the wiki

pyAudioAnalysis provides easy-to-call wrappers to execute audio analysis tasks. Eg, this code first trains an audio segment
classifier, given a set of WAV files stored in folders (each folder representing a different class) and then the trained classifier is
used to classify an unknown audio WAV file

from pyAudioAnalysis import audioTrainTest as aT


aT.featureAndTrain(["classifierData/music","classifierData/speech"], 1.0, 1.0, aT.shortTermWindow,
aT.shortTermStep, "svm", "svmSMtemp", False)
aT.fileClassification("data/doremi.wav", "svmSMtemp","svm")
Result:
(0.0, array([ 0.90156761, 0.09843239]), ['music', 'speech'])

In addition, command-line support is provided for all functionalities. E.g. the following command extracts the spectrogram of
an audio signal stored in a WAV file: python audioAnalysis.py fileSpectrogram -i data/doremi.wav

Further reading
Apart from the current README file and the wiki, a more general and theoretic description of the adopted methods (along
with several experiments on particular use-cases) is presented in this publication. Please use the following citation when
citing pyAudioAnalysis in your research work:

@article{giannakopoulos2015pyaudioanalysis,
title={pyAudioAnalysis: An Open-Source Python Library for Audio Signal Analysis},
author={Giannakopoulos, Theodoros},
journal={PloS one},
volume={10},

https://github.com/tyiannak/pyAudioAnalysis 2/3
9/21/2019 GitHub - tyiannak/pyAudioAnalysis: Python Audio Analysis Library: Feature Extraction, Classification, Segmentation and Applications
number={12},
year={2015},
publisher={Public Library of Science}
}

Finally, for Matlab-related audio analysis material check this book.

Author
Theodoros Giannakopoulos, Director of Machine Learning at Behavioral Signals

https://github.com/tyiannak/pyAudioAnalysis 3/3

You might also like