Scientific Audio
Python for Scientific Audio¶
The aim of this repository is to create a comprehensive, curated list of python software/tools related and used for scientific research in audio/music applications.
Audio Related Packages¶
- Total number of packages: 66
Read-Write¶
- audiolazy :octocat: - Expressive Digital Signal Processing (DSP) package for Python.
- audioread :octocat: - Cross-library (GStreamer + Core Audio + MAD + FFmpeg) audio decoding.
- mutagen :octocat: - Reads and writes all kind of audio metadata for various formats.
- pyAV :octocat: - PyAV is a Pythonic binding for FFmpeg or Libav.
- (Py)Soundfile :octocat: - Library based on libsndfile, CFFI, and NumPy.
- pySox :octocat: - Wrapper for sox.
- stempeg :octocat: - read/write of STEMS multistream audio.
- tinytag :octocat: - reading music meta data of MP3, OGG, FLAC and Wave files.
Transformations - General DSP¶
- acoustics :octocat: - useful tools for acousticians.
- AudioTK :octocat: - DSP filter toolbox (lots of filters).
- AudioTSM :octocat: - real-time audio time-scale modification procedures.
- Gammatone :octocat: - Gammatone filterbank implementation.
- pyFFTW :octocat: - Wrapper for FFTW(3).
- NSGT :octocat: - Non-stationary gabor transform, constant-q.
- matchering :octocat: - Automated reference audio mastering.
- MDCT :octocat: - MDCT transform.
- pydub :octocat: - Manipulate audio with a simple and easy high level interface.
- pytftb :octocat: - Implementation of the MATLAB Time-Frequency Toolbox.
- pyroomacoustics :octocat: - Room Acoustics Simulation (RIR generator)
- PyRubberband :octocat: - Wrapper for rubberband to do pitch-shifting and time-stretching.
- PyWavelets :octocat: - Discrete Wavelet Transform in Python.
- Resampy :octocat: - Sample rate conversion.
- SFS-Python :octocat: - Sound Field Synthesis Toolbox.
- sound_field_analysis :octocat: - Analyze, visualize and process sound field data recorded by spherical microphone arrays.
- STFT :octocat: - Standalone package for Short-Time Fourier Transform.
Feature extraction¶
- aubio :octocat: - Feature extractor, written in C, Python interface.
- audioFlux :octocat: - A library for audio and music analysis, feature extraction.
- audiolazy :octocat: - Realtime Audio Processing lib, general purpose.
- essentia :octocat: - Music related low level and high level feature extractor, C++ based, includes Python bindings.
- python_speech_features :octocat: - Common speech features for ASR.
- pyYAAFE :octocat: - Python bindings for YAAFE feature extractor.
- speechpy :octocat: - Library for Speech Processing and Recognition, mostly feature extraction for now.
- spafe :octocat: - Python library for features extraction from audio files.
Data augmentation¶
- audiomentations :octocat: - Audio Data Augmentation.
- muda :octocat: - Musical Data Augmentation.
- pydiogment :octocat: - Audio Data Augmentation.
Speech Processing¶
- aeneas :octocat: - Forced aligner, based on MFCC+DTW, 35+ languages.
- deepspeech :octocat: - Pretrained automatic speech recognition.
- gentle :octocat: - Forced-aligner built on Kaldi.
- Parselmouth :octocat: - Python interface to the Praat phonetics and speech analysis, synthesis, and manipulation software.
- persephone :octocat: - Automatic phoneme transcription tool.
- pyannote.audio :octocat: - Neural building blocks for speaker diarization.
- pyAudioAnalysisยฒ :octocat: - Feature Extraction, Classification, Diarization.
- py-webrtcvad :octocat: - Interface to the WebRTC Voice Activity Detector.
- pypesq :octocat: - Wrapper for the PESQ score calculation.
- pystoi :octocat: - Short Term Objective Intelligibility measure (STOI).
- PyWorldVocoder :octocat: - Wrapper for Morise's World Vocoder.
- Montreal Forced Aligner :octocat: - Forced aligner, based on Kaldi (HMM), English (others can be trained).
- SIDEKIT - Speaker and Language recognition.
- SpeechRecognition :octocat: - Wrapper for several ASR engines and APIs, online and offline.
Environmental Sounds¶
Perceptial Models - Auditory Models¶
- cochlea :octocat: - Inner ear models.
- Brian2 :octocat: - Spiking neural networks simulator, includes cochlea model.
- Loudness :octocat: - Perceived loudness, includes Zwicker, Moore/Glasberg model.
- pyloudnorm :octocat: - Audio loudness meter and normalization, implements ITU-R BS.1770-4.
- Sound Field Synthesis Toolbox :octocat: - Sound Field Synthesis Toolbox.
Source Separation¶
- commonfate :octocat: - Common Fate Model and Transform.
- NTFLib :octocat: - Sparse Beta-Divergence Tensor Factorization.
- NUSSL :octocat: - Holistic source separation framework including DSP methods and deep learning methods.
- NIMFA :octocat: - Several flavors of non-negative-matrix factorization.
Music Information Retrieval¶
- Catchy :octocat: - Corpus Analysis Tools for Computational Hook Discovery.
- chord-detection :octocat: - Algorithms for chord detection and key estimation.
- Madmom :octocat: - MIR packages with strong focus on beat detection, onset detection and chord recognition.
- mir_eval :octocat: - Common scores for various MIR tasks. Also includes bss_eval implementation.
- msaf :octocat: - Music Structure Analysis Framework.
- librosa :octocat: - General audio and music analysis.
Deep Learning¶
- Kapre :octocat: - Keras Audio Preprocessors
- TorchAudio :octocat: - PyTorch Audio Loaders
- nnAudio :octocat: - Accelerated audio processing using 1D convolution networks in PyTorch.
Symbolic Music - MIDI - Musicology¶
- Music21 :octocat: - Toolkit for Computer-Aided Musicology.
- Mido :octocat: - Realtime MIDI wrapper.
- mingus :octocat: - Advanced music theory and notation package with MIDI file and playback support.
- Pretty-MIDI :octocat: - Utility functions for handling MIDI data in a nice/intuitive way.
Realtime applications¶
- Jupylet :octocat: - Subtractive, additive, FM, and sample-based sound synthesis.
- PYO :octocat: - Realtime audio dsp engine.
- python-sounddevice :octocat: - PortAudio wrapper providing realtime audio I/O with NumPy.
- ReTiSAR :octocat: - Binarual rendering of streamed or IR-based high-order spherical microphone array signals.
Web Audio¶
- TimeSide (Beta) :octocat: - high level audio analysis, imaging, transcoding, streaming and labelling.
Audio Dataset and Dataloaders¶
- beets :octocat: - Music library manager and MusicBrainz tagger.
- musdb :octocat: - Parse and process the MUSDB18 dataset.
- medleydb :octocat: - Parse medleydb audio + annotations.
- Soundcloud API :octocat: - Wrapper for Soundcloud API.
- Youtube-Downloader :octocat: - Download youtube videos (and the audio).
- audiomate :octocat: - Loading different types of audio datasets.
- mirdata :octocat: - Common loaders for Music Information Retrieval (MIR) datasets.
Wrappers for Audio Plugins¶
- VamPy Host - Interface compiled vamp plugins.
Tutorials¶
- Whirlwind Tour Of Python :octocat: - fast-paced introduction to Python essentials, aimed at researchers and developers.
- Introduction to Numpy and Scipy :octocat: - Highly recommended tutorial, covers large parts of the scientific Python ecosystem.
- Numpy for MATLABยฎ Users - Short overview of equivalent python functions for switchers.
- MIR Notebooks :octocat: - collection of instructional iPython Notebooks for music information retrieval (MIR).
- Selected Topics in Audio Signal Processing - Exercises as iPython notebooks.
- Live-coding a music synthesizer Live-coding video showing how to use the SoundDevice library to reproduce realistic sounds. Code.
Books¶
- Python Data Science Handbook - Jake Vanderplas, Excellent Book and accompanying tutorial notebooks.
- Fundamentals of Music Processing - Meinard Mรผller, comes with Python exercises.
Scientific Papers¶
- Python for audio signal processing - John C. Glover, Victor Lazzarini and Joseph Timoney, Linux Audio Conference 2011.
- librosa: Audio and Music Signal Analysis in Python, Video - Brian McFee, Colin Raffel, Dawen Liang, Daniel P.W. Ellis, Matt McVicar, Eric Battenberg, Oriol Nieto, Scipy 2015.
- pyannote.audio: neural building blocks for speaker diarization, Video - Hervรฉ Bredin, Ruiqing Yin, Juan Manuel Coria, Gregory Gelly, Pavel Korshunov, Marvin Lavechin, Diego Fustes, Hadrien Titeux, Wassim Bouaziz, Marie-Philippe Gill, ICASSP 2020.
Other Resources¶
- Coursera Course - Audio Signal Processing, Python based course from UPF of Barcelona and Stanford University.
- Digital Signal Processing Course - Masters Course Material (University of Rostock) with many Python examples.
- Slack Channel - Music Information Retrieval Community.
Related lists¶
There is already PythonInMusic but it is not up to date and includes too many packages of special interest that are mostly not relevant for scientific applications. Awesome-Python is large curated list of python packages. However, the audio section is very small.
Contributing¶
Your contributions are always welcome! Please take a look at the contribution guidelines first.
I will keep some pull requests open if I'm not sure whether those libraries are awesome, you could vote for them by adding ๐ to them.