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 very 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 very easy to use and can handle basic as well as advanced tasks related to audio and music processing. The library is open source and is freely available under the ISC License.
The library provides a great deal of flexibility to expert users and at the same time also awesome to beginner users which are more interested in processing audio files. The library has included support for several important 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 audios
- MP3 support
- Audio Sprites
- Auto caching
- Handle edge
- Encodes audios
- Decodes audios
- 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). Please use the following command for complete installation.
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.