API Reference
Classes
Section titled “Classes”BeatAnalysisConfig
Section titled “BeatAnalysisConfig”Configuration for the beat-analysis subsystem.
BeatAnalysisGenerationProvider
Section titled “BeatAnalysisGenerationProvider”Provider that registers a configured BeatAnalysisProvider backend.
BeatAnalysisModule
Section titled “BeatAnalysisModule”Librosa/madmom tempo-and-beat-detection integration.
LibrosaBeatAnalysisProvider
Section titled “LibrosaBeatAnalysisProvider”Talks to no server — runs librosa's beat tracker in-process.
Configure the in-process librosa backend.
Parameters
| Parameter | Type | Description |
|---|---|---|
| `sample_rate` | int | Target sample rate for analysis. |
| `max_asset_bytes` | int | Reject assets larger than this many bytes. |
| `max_analyze_samples` | int | Reject decoded audio longer than this many samples. |
| `resolver` | HostResolver | None | Optional hostname resolver for the URL-safety check. Defaults to the system resolver. |
Analyze an asset and return its tempo and beat timestamps.
Parameters
| Parameter | Type | Description |
|---|---|---|
| `request` | BeatAnalysisRequest | The asset to analyze. |
Returns
| Type | Description |
|---|---|
| Result[BeatAnalysisResult, MultimediaError] | Ok(analysis) on success, Err(error) when the asset is unsafe, oversized, or undecodable. |
MadmomBeatAnalysisProvider
Section titled “MadmomBeatAnalysisProvider”Talks to a madmom_server.py reference server via BeatAnalysisProvider.
Exceptions
Section titled “Exceptions”BeatAnalysisDecodeError
Section titled “BeatAnalysisDecodeError”Audio could not be decoded, or was rejected before decoding.
Covers undecodable files, unsafe asset URIs, payloads over the
max_asset_bytes cap, probed durations over the
max_analyze_samples ceiling, and decoded arrays over the
max_analyze_samples ceiling.