skillfed

librosa

Python module for audio and music processing

librosa v1.0.0 13.6M downloads/30d#1,274 on PyPI8,560
Permissive license ISC Active released

What it is and what it does

librosa is a foundational Python library for audio and music signal processing, designed to support music information retrieval (MIR) research and applications. It provides algorithms for feature extraction, spectral analysis, and music analysis tasks. The library depends on scientific computing foundations (numpy, scipy, scikit-learn) and uses numba for performance-critical code, plus soundfile and soxr for audio I/O and resampling.

Developers use librosa to extract features from audio (mel-spectrograms, chroma, MFCC, onset detection), analyze musical structure, and build systems that understand or process music. It's production-stable (Development Status 5), actively maintained with a recent release, and widely adopted in music technology and research.

Use it for:

  • Extract mel-spectrograms and other acoustic features from audio files for machine learning models.
  • Detect musical onsets, beats, and tempo to analyze rhythm and timing in recordings.
  • Compute chroma features and harmonic/percussive separation for music analysis and transcription tasks.
  • Build music recommendation or similarity systems using librosa feature vectors.
  • Analyze audio for speech processing, environmental sound classification, or audio event detection.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

librosa provides audio and music signal processing algorithms and tools for building music information retrieval systems in Python.

Yes. librosa is production-stable, actively maintained, has low install friction, carries a permissive license, and is the standard Python library for audio and music signal processing. Install it if you need to work with audio features, music analysis, or MIR tasks. No known security vulnerabilities.

Install

librosa on PyPI

pip

pip install librosa

uv

uv add librosa

poetry

poetry add librosa

Installing librosa

Before you install

Low friction: pure Python wheel available, active maintenance with release 3 days ago, 11 runtime dependencies all widely used (numba, numpy, scipy, scikit-learn, joblib, soundfile, pooch, soxr, decorator, lazy_loader, msgpack).

License in practice

ISC license is permissive, allowing commercial and private use with minimal restrictions—suitable for most projects.

Quickstart

pip install librosa

import librosa
y, sr = librosa.load('audio.wav')
S = librosa.feature.melspectrogram(y=y, sr=sr)

Requires Python 3.12 or later; soundfile and soxr may require system audio libraries depending on your platform.

Verify before relying

  • Whether soxr and soundfile have platform-specific system dependencies that could affect installation on Windows, macOS, or Linux.
  • Performance characteristics when processing very large audio files or real-time streaming scenarios.

Package facts

License ISC (permissive)
Python support supports the current Python release (>=3.12)
Install friction low — pure-Python wheel
Runtime dependencies 11 — numba, numpy, scipy, scikit-learn, joblib, decorator, soundfile, pooch, soxr, lazy_loader, msgpack
Maintenance actively maintained — 3 days since the last release
Last repo commit
First released
Downloads 13,551,389/month — #1,274 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: librosa-1.0.0-py3-none-any.whl

Development Status :: 5 - Production/StableFramework :: MatplotlibIntended Audience :: DevelopersLicense :: OSI Approved :: ISC License (ISCL)Programming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Multimedia :: Sound/Audio :: Analysis

Tags

audio signal processing pythonmusic information retrievalaudio feature extractionmusic analysis libraryspectral analysis audioaudio waveform processingmusic mir tools
audio-processingmusic-analysissignal-processing

More Analysis packages