Skip to content

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

License

Notifications You must be signed in to change notification settings

AI-Cdrone/pyAudioAnalysis

 
 

Repository files navigation

pyAudioAnalysis: A Python Audio Analysis Library

pyAudioAnalysis is a Python library covering a wide range of audio analysis tasks, including: feature extraction, classification, segmentation and visualization. The user can perform the following tasks:

  • Extract a wide range of audio features and representations (e.g. spectrogram, chromagram)
  • Train, parameter tune and evaluate segment-based classifiers
  • Classify unknown samples
  • Detect audio events and exclude silence periods from long recordings
  • Perform supervised segmentation (i.e. apply a clasification model on fix-sized segments)
  • Perform unsupervised segmentation (e.g. speaker diarization)
  • Extract audio thumbnails
  • Train and use audio regression models (example application: emotion recognition)
  • Apply dimensionality reduction techniques to visualize audio data and content similarities

[(follow this link for the complete documentation)] (https://github.com/tyiannak/pyAudioAnalysis/wiki)

pyAudioAnalysis provides easy-to-call wrappers to execute audio analysis tasks. For example, to train a classifier segments, given a set of WAV files stored in folders, each folder representing a different class, the following code needs to be executed:

from pyAudioAnalysis import audioTrainTest as aT
aT.featureAndTrain(["classifierData/music","classifierData/speech"], 1.0, 1.0, aT.shortTermWindow, aT.shortTermStep, "svm", "svmSMtemp", False)

Then, the resulting classification model can be used to classify an unknown audio WAV file:

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 needs to be executed to extract the spectrogram of an audio signal stored in a WAV file:

python audioAnalysis.py fileSpectrogram -i data/doremi.wav

[Installing instructions and a complete documentation is provided in the wiki] (https://github.com/tyiannak/pyAudioAnalysis/wiki)

Author: [Theodoros Giannakopoulos]

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 95.3%
  • HTML 2.3%
  • CSS 1.2%
  • Other 1.2%