Fast audio analysis library — librosa-like API, 80x faster (C++ with Python bindings)
Project description
libsonare
Fast audio analysis library for Python — librosa-like API, 80x faster.
Built on a C++ core with zero Python dependencies.
Installation
pip install libsonare
Quick Start
import libsonare
# Detect BPM
bpm = libsonare.detect_bpm(samples, sample_rate=22050)
# Detect musical key
key = libsonare.detect_key(samples, sample_rate=22050)
print(f"{key.root.name} {key.mode.name}") # e.g. "C MAJOR"
# Full analysis
result = libsonare.analyze(samples, sample_rate=22050)
print(f"BPM: {result.bpm}, Key: {result.key}")
# Audio class (convenience wrapper)
audio = libsonare.Audio.from_file("song.mp3")
print(f"BPM: {audio.detect_bpm()}")
print(f"Key: {audio.detect_key()}")
Features
- Detection: BPM, key, beats, onsets, chords
- Effects: HPSS, pitch shift, time stretch, normalize, trim
- Features: STFT, mel spectrogram, MFCC, chroma, spectral features, pitch tracking
- Conversions: Hz/mel/MIDI/note, frames/time
librosa Compatibility
Default parameters match librosa:
- Sample rate: 22050 Hz
- n_fft: 2048
- hop_length: 512
- n_mels: 128
License
Apache-2.0
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file libsonare-1.0.0-py3-none-manylinux_2_17_x86_64.whl.
File metadata
- Download URL: libsonare-1.0.0-py3-none-manylinux_2_17_x86_64.whl
- Upload date:
- Size: 479.9 kB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
673c99987f22bef71e09f029ce7a530cefaef906a380fc639ff0922bed149ce9
|
|
| MD5 |
04a63b1b8efd8b36c536b2c9af28a23c
|
|
| BLAKE2b-256 |
76a3be095cb49fe66da9a1389f35d78d6d2d4ec6431469bcec4375056c4d47f3
|
Provenance
The following attestation bundles were made for libsonare-1.0.0-py3-none-manylinux_2_17_x86_64.whl:
Publisher:
publish.yml on libraz/libsonare
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
libsonare-1.0.0-py3-none-manylinux_2_17_x86_64.whl -
Subject digest:
673c99987f22bef71e09f029ce7a530cefaef906a380fc639ff0922bed149ce9 - Sigstore transparency entry: 1179739163
- Sigstore integration time:
-
Permalink:
libraz/libsonare@318c5231bdb6aa73518117b5423df9c46f77f028 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/libraz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@318c5231bdb6aa73518117b5423df9c46f77f028 -
Trigger Event:
push
-
Statement type:
File details
Details for the file libsonare-1.0.0-py3-none-manylinux_2_17_aarch64.whl.
File metadata
- Download URL: libsonare-1.0.0-py3-none-manylinux_2_17_aarch64.whl
- Upload date:
- Size: 442.9 kB
- Tags: Python 3, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6229da6e8e8ce7df6181a9e0f225cce611b0b451187ebd6928d71b554d7677e2
|
|
| MD5 |
6afb619bbe2b471dad75cbb5754002f7
|
|
| BLAKE2b-256 |
ac3564811d72d94cdcb062dbf20a89f4537263c2fc05972293bbc6bf7389183f
|
Provenance
The following attestation bundles were made for libsonare-1.0.0-py3-none-manylinux_2_17_aarch64.whl:
Publisher:
publish.yml on libraz/libsonare
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
libsonare-1.0.0-py3-none-manylinux_2_17_aarch64.whl -
Subject digest:
6229da6e8e8ce7df6181a9e0f225cce611b0b451187ebd6928d71b554d7677e2 - Sigstore transparency entry: 1179739191
- Sigstore integration time:
-
Permalink:
libraz/libsonare@318c5231bdb6aa73518117b5423df9c46f77f028 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/libraz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@318c5231bdb6aa73518117b5423df9c46f77f028 -
Trigger Event:
push
-
Statement type:
File details
Details for the file libsonare-1.0.0-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: libsonare-1.0.0-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 366.9 kB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06a8c1195253287342c10e580fca20444cba85ad1206d7149ef208a88e29168c
|
|
| MD5 |
62c9fb40d8c9622a0b8d973df31cd3ab
|
|
| BLAKE2b-256 |
64746516eb1db793674bca0134fd78806022b369c264eb0de2917b3b556c4da2
|
Provenance
The following attestation bundles were made for libsonare-1.0.0-py3-none-macosx_11_0_arm64.whl:
Publisher:
publish.yml on libraz/libsonare
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
libsonare-1.0.0-py3-none-macosx_11_0_arm64.whl -
Subject digest:
06a8c1195253287342c10e580fca20444cba85ad1206d7149ef208a88e29168c - Sigstore transparency entry: 1179739223
- Sigstore integration time:
-
Permalink:
libraz/libsonare@318c5231bdb6aa73518117b5423df9c46f77f028 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/libraz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@318c5231bdb6aa73518117b5423df9c46f77f028 -
Trigger Event:
push
-
Statement type: