Skip to main content

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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

libsonare-1.0.0-py3-none-manylinux_2_17_x86_64.whl (479.9 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

libsonare-1.0.0-py3-none-manylinux_2_17_aarch64.whl (442.9 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

libsonare-1.0.0-py3-none-macosx_11_0_arm64.whl (366.9 kB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

Details for the file libsonare-1.0.0-py3-none-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for libsonare-1.0.0-py3-none-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 673c99987f22bef71e09f029ce7a530cefaef906a380fc639ff0922bed149ce9
MD5 04a63b1b8efd8b36c536b2c9af28a23c
BLAKE2b-256 76a3be095cb49fe66da9a1389f35d78d6d2d4ec6431469bcec4375056c4d47f3

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file libsonare-1.0.0-py3-none-manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for libsonare-1.0.0-py3-none-manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 6229da6e8e8ce7df6181a9e0f225cce611b0b451187ebd6928d71b554d7677e2
MD5 6afb619bbe2b471dad75cbb5754002f7
BLAKE2b-256 ac3564811d72d94cdcb062dbf20a89f4537263c2fc05972293bbc6bf7389183f

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file libsonare-1.0.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for libsonare-1.0.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 06a8c1195253287342c10e580fca20444cba85ad1206d7149ef208a88e29168c
MD5 62c9fb40d8c9622a0b8d973df31cd3ab
BLAKE2b-256 64746516eb1db793674bca0134fd78806022b369c264eb0de2917b3b556c4da2

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page