Expand description
BPM estimation via onset-strength autocorrelation.
Reads raw PCM data from WAV and AIFF files, computes an energy envelope, derives onset strength, then uses autocorrelation to find the dominant tempo in the 50โ220 BPM range.
Functionsยง
- decode_
pcm ๐ - Decode raw PCM bytes to mono f32 samples, normalized to [-1, 1].
- decode_
with_ ๐symphonia - Decode compressed audio (MP3, FLAC, OGG, M4A, AAC) via symphonia. Returns mono f32 samples + sample rate, or None on failure.
- decode_
with_ symphonia_ pub - detect_
tempo ๐ - Detect tempo using onset-strength autocorrelation.
- estimate_
bpm - Estimate BPM for an audio file. Returns None for unsupported formats, unreadable files, or when no clear tempo is detected.
- read_
aiff_ ๐pcm - Read AIFF file and return mono f32 samples + sample rate.
- read_
aiff_ pcm_ pub - read_
wav_ ๐pcm - Read WAV file and return mono f32 samples + sample rate.
- read_
wav_ pcm_ pub