pyaudioanalysis

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

https://github.com/tyiannak/pyaudioanalysis

Science Score: 59.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in README
  • Academic publication links
    Links to: plos.org
  • Committers with academic emails
    2 of 28 committers (7.1%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.4%) to scientific vocabulary

Keywords

audio audio-analysis-tasks audio-data machine-learning pyaudioanalysis python signal-processing

Keywords from Contributors

shellcode jax tensors cryptography distributed profiling datetime ansi-colors diagram rabbitmq
Last synced: 6 months ago · JSON representation

Repository

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

Basic Info
  • Host: GitHub
  • Owner: tyiannak
  • License: apache-2.0
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 164 MB
Statistics
  • Stars: 6,127
  • Watchers: 206
  • Forks: 1,222
  • Open Issues: 206
  • Releases: 0
Topics
audio audio-analysis-tasks audio-data machine-learning pyaudioanalysis python signal-processing
Created over 11 years ago · Last pushed 7 months ago
Metadata Files
Readme Funding License

README.md

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

  • [2025-03-29] Check Behavioral Signals Python SDK that demonstrates how to use Behavioral Signals' API to send speech data and retrieve predictions related to emotions and behaviors using Python code. It works in both batch and streaming mode. Now Behavioral Signals' API also supports a Speaker Agnostic Deep Fake Detector.
  • [2021-08-06] deep-audio-features deep audio classification and feature extraction using CNNs and Pytorch
  • Check out paura a Python script for realtime recording and analysis of audio data

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

python from pyAudioAnalysis import audioTrainTest as aT aT.extract_features_and_train(["classifierData/music","classifierData/speech"], 1.0, 1.0, aT.shortTermWindow, aT.shortTermStep, "svm", "svmSMtemp", False) 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: * Audio Handling Basics: Process Audio Files In Command-Line or Python, if you want to learn how to handle audio files from command line, and some basic programming on audio signal processing. Start with that if you don't know anything about audio. * Intro to Audio Analysis: Recognizing Sounds Using Machine Learning This goes a bit deeper than the previous article, by providing a complete intro to theory and practice of audio feature extraction, classification and segmentation (includes many Python examples). * The library's wiki * How to Use Machine Learning to Color Your Lighting Based on Music Mood. An interesting use-case of using this lib to train a real-time music mood estimator. * 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: python @article{giannakopoulos2015pyaudioanalysis, title={pyAudioAnalysis: An Open-Source Python Library for Audio Signal Analysis}, author={Giannakopoulos, Theodoros}, journal={PloS one}, volume={10}, number={12}, year={2015}, publisher={Public Library of Science} }

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"

Owner

  • Name: Theodoros Giannakopoulos
  • Login: tyiannak
  • Kind: user
  • Location: Athens, Greece
  • Company: NCSR Demokritos

Principal Researcher of Multimodal Machine Learning

GitHub Events

Total
  • Issues event: 5
  • Watch event: 270
  • Issue comment event: 3
  • Pull request event: 2
  • Fork event: 39
Last Year
  • Issues event: 5
  • Watch event: 270
  • Issue comment event: 3
  • Pull request event: 2
  • Fork event: 39

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 724
  • Total Committers: 28
  • Avg Commits per committer: 25.857
  • Development Distribution Score (DDS): 0.11
Past Year
  • Commits: 1
  • Committers: 1
  • Avg Commits per committer: 1.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Theodoros Giannakopoulos t****k@g****m 644
dimitris d****u@h****r 30
Xiaonuo Gantan x****n@g****m 6
dimitris D****s 4
John Yeung c****7@g****m 3
Frankie Eder f****r@o****o 3
avikam a****m@g****m 3
Theodoros Giannakopoulos t****k@m****l 2
ftfish f****h@g****m 2
sofiaele s****3@g****m 2
cclauss c****s@m****m 2
Suresh KUMAR Mukhiya i****9@g****m 2
RyanBuchner 6****r 2
Hiroshi TAKEDA t****t@g****m 2
Harsheet-saxena h****9@g****m 2
Felix Lachenmaier f****r@t****e 2
BStoimenov B****v@g****m 2
BD103 5****3 1
Derek Chia d****k@d****m 1
Fredrik Erlandsson f****e@g****m 1
Lars Bergmann l****n@p****e 1
Tim Gates t****s@i****m 1
Unknown P****r@s****l 1
Justin Bacle j****e@d****m 1
johnyoonh 1****h 1
lobracost p****s@g****m 1
marcsello p****l@r****m 1
pvanlaar p****r@o****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 99
  • Total pull requests: 25
  • Average time to close issues: 9 months
  • Average time to close pull requests: 6 months
  • Total issue authors: 88
  • Total pull request authors: 22
  • Average comments per issue: 1.59
  • Average comments per pull request: 0.56
  • Merged pull requests: 9
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 6
  • Pull requests: 2
  • Average time to close issues: 2 days
  • Average time to close pull requests: N/A
  • Issue authors: 6
  • Pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • tyiannak (3)
  • lxrswdd (3)
  • qkum (3)
  • needpeeling (2)
  • slowglow (2)
  • vybhav72954 (2)
  • gregsadetsky (2)
  • PeterBan11 (2)
  • nobleding (1)
  • YK9999 (1)
  • Emi77H (1)
  • Kakon5 (1)
  • Omaiwei-kun (1)
  • aslam021 (1)
  • divyanshu13 (1)
Pull Request Authors
  • cclauss (3)
  • Caparrini (2)
  • JohnYeung-dojjy (1)
  • BD103 (1)
  • lobracost (1)
  • marcsello (1)
  • mengtongun (1)
  • frankieeder (1)
  • huntr-helper (1)
  • KobaKhit (1)
  • ozonejunkieau (1)
  • sofiaele (1)
  • alana-coleman (1)
  • jrmccluskey (1)
  • fspigel (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 25,528 last-month
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 19
    (may contain duplicates)
  • Total versions: 23
  • Total maintainers: 1
pypi.org: pyaudioanalysis

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

  • Versions: 22
  • Dependent Packages: 0
  • Dependent Repositories: 8
  • Downloads: 25,338 Last month
Rankings
Stargazers count: 0.4%
Forks count: 1.2%
Downloads: 2.7%
Average: 3.9%
Dependent repos count: 5.2%
Dependent packages count: 10.0%
Maintainers (1)
Last synced: 6 months ago
pypi.org: audiotools

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

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 11
  • Downloads: 190 Last month
Rankings
Stargazers count: 0.4%
Forks count: 1.2%
Dependent repos count: 4.4%
Average: 5.8%
Dependent packages count: 10.0%
Downloads: 12.7%
Maintainers (1)
Last synced: 7 months ago

Dependencies

requirements.txt pypi
  • eyeD3 ==0.9.6
  • hmmlearn ==0.2.5
  • imblearn *
  • matplotlib ==3.4.2
  • numpy ==1.20.3
  • pandas ==1.2.4
  • plotly ==5.3.1
  • pydub ==0.25.1
  • scikit_learn ==0.24.2
  • scipy ==1.6.3
  • simplejson ==3.16.0
  • tqdm ==4.52.0