Open Source Python Library for Audio Processing
Python API that allows developers to load and play audio from disk, compute various spectrogram representations, and much more.
Librosa is useful Python music and audio analysis library that helps software developers to build applications for working with audio and music file formats using Python. The library is easy to use and can handle basic as well as advanced tasks related to audio and music processing. It is open source and freely available under the ISC License.
The library provides a great deal of flexibility to expert users who may be interested in processing audio files. The library supports several features related to audio files processing and extraction such as load audio from disk, compute various spectrogram representations, harmonic-percussive source separation, generic spectrogram decomposition, loads and decodes the audio, Time-domain audio processing, sequential modeling, integrating harmonic-percussive separation, beat-synchronous and many more.
At A Glance
An overview of Librosa features.
- Play Audio
- Visualizing Audio
- Extract Audio Features
- Manage Audio
- MP3 Support
- Audio Sprites
- Auto Caching
- Handle Edge
- Encodes Audio
- Decodes Audio
- Sequential Modeling
Librosa only requires Python runtime.
Getting Started with Librosa
The easiest way to install Librosa is by using the Python Package Index (PyPI).
Loading and Visualizing Audio Files via Python
The Python library Librosa allows software programmers to load and visualize audio files inside their own Python application. First of all you need to load the audio file and play it by using a Python command in Jupyter Notebook. Next, you can easily visualize the sampled signal and plot it. You can use waveform visualization of the amplitude vs. the time representation of the signal or can also use Spectrogram visualization or Log-frequency axis.
Create and Save Audio Signal via Python
Analog and digital signals are both different types of signals that can carry information. A digital audio signal is a NumPy array with a specified frequency and sample rate. On the other hand, the analog wave format of the audio signal represents a function. The open source Python library Librosa gives software developers the power to create an audio signal and save it to the place of their choice using Python code.
Extract Audio Feature using Python
The open source Python library Librosa gives software developers the capability to load and extract audio features inside their own apps using Python commands. There are various ways to extract features from audio data, such as zero-crossing rate, spectral roll-off frequency, Mel-frequency Cepstral Coefficients (MFCC), Chroma Frequencies and many more.