项目作者: tyiannak

项目描述 :
Python音频分析库:特征提取,分类,分割和应用
高级语言: Python
项目地址: git://github.com/tyiannak/pyAudioAnalysis.git
创建时间: 2014-08-27T12:43:13Z
项目社区:https://github.com/tyiannak/pyAudioAnalysis

开源协议:Apache License 2.0

下载


A Python library for audio feature extraction, classification, segmentation and applications" class="reference-link"> A Python library for audio feature extraction, classification, segmentation and applications

This is general info. Click here for the complete wiki and here for a more generic intro to audio data handling

News

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)
  • Train, parameter tune and evaluate classifiers of audio segments
  • Classify unknown sounds
  • Detect audio events and exclude silence periods from long recordings
  • Perform supervised segmentation (joint segmentation - classification)
  • Perform unsupervised segmentation (e.g. speaker diarization) and extract audio thumbnails
  • Train and use audio regression models (example application: emotion recognition)
  • Apply dimensionality reduction to visualize audio data and content similarities

Installation

  • Clone the source of this library: git clone https://github.com/tyiannak/pyAudioAnalysis.git
  • Install dependencies: pip install -r ./requirements.txt
  • Install using pip: pip install -e .

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

  1. from pyAudioAnalysis import audioTrainTest as aT
  2. aT.extract_features_and_train(["classifierData/music","classifierData/speech"], 1.0, 1.0, aT.shortTermWindow, aT.shortTermStep, "svm", "svmSMtemp", False)
  3. aT.file_classification("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 this README file, to bettern understand how to use this library one should read the following:

For Matlab-related audio analysis material check this book.

Author

Theodoros Giannakopoulos,
Principal Researcher of Multimodal Machine Learning at the Multimedia Analysis Group of the Computational Intelligence Lab (MagCIL) of the Institute of Informatics and Telecommunications, of the National Center for Scientific Research “Demokritos”