Skip to main content

A comprehensive validation and benchmarking tool for aubio audio analysis

Project description

Aubio BeatCheck

A comprehensive validation and benchmarking tool for testing aubio audio analysis functions. Designed for closed-loop optimization of aubio parameters and performance tracking.

Features

  • ๐ŸŽฏ Standard Test Suites - Comprehensive pre-built test signals for tempo, onset, pitch, and complex analysis
  • ๐Ÿ“Š Evaluation Metrics - Precision, recall, F-measure, and timing accuracy (MAE)
  • ๐Ÿ“ˆ Waveform Visualization - Interactive plots comparing ground truth vs detected events
  • ๐Ÿ’พ JSON Artifacts - Machine-readable outputs for AI-driven optimization
  • โšก Performance Metrics - Frame processing times (mean, P95, P99)
  • ๐ŸŒ Web UI + CLI - Choose between interactive web interface or scriptable CLI

Installation

# Clone the repository
git clone https://github.com/shauneccles/aubio-beatcheck.git
cd aubio-beatcheck

# Install with uv (recommended)
uv sync

# Or with pip
pip install -e .

Quick Start

CLI Mode (for AI Agent Integration)

Run analysis and generate JSON/PNG artifacts:

# Run tempo suite with 10-second signals
aubio-beatcheck run --suite tempo --duration 10 --output ./results

# Run all suites
aubio-beatcheck run --suite all --duration 15 --output ./results

# Output structure:
# ./results/
# โ”œโ”€โ”€ test_input.json          # Test configuration
# โ”œโ”€โ”€ ground_truth.json        # Expected events
# โ”œโ”€โ”€ analysis_results.json    # Detected events + metrics
# โ”œโ”€โ”€ evaluation.json          # Precision/recall/F1
# โ””โ”€โ”€ plots/
#     โ””โ”€โ”€ *.png                # Waveform visualizations

Web UI Mode

Start the web server for interactive analysis:

# Start backend
aubio-beatcheck web --port 8000

# Start frontend (in another terminal)
cd web && npm run dev

# Open http://localhost:5173

Test Suites

Suite Description Tests
tempo Beat tracking & BPM detection 60-180 BPM, timing jitter, click durations
onset Transient detection Attack types (impulse, sharp, medium, slow)
pitch Fundamental frequency Chromatic scales, intervals, waveforms
rhythmic Complex patterns Syncopation, polyrhythms
complex Combined signals Beats + melody + noise at various SNR
all All of the above Full validation suite

API Reference

REST Endpoints

Method Endpoint Description
GET /api/suites List available test suites
POST /api/suites/{id}/run Start analysis
GET /api/results/{suite_id} Get analysis results
GET /api/results/{suite_id}/{signal}/plot Get waveform plot (PNG)

JSON Artifact Formats

See docs/API.md for detailed schema documentation.

Development

# Install dev dependencies
uv sync --all-extras --dev

# Run tests
uv run pytest tests/ -v

# Lint & format
uv run ruff check .
uv run ruff format .

Architecture

aubio-beatcheck/
โ”œโ”€โ”€ aubio_beatcheck/          # Core package
โ”‚   โ”œโ”€โ”€ cli.py                # CLI entry point
โ”‚   โ”œโ”€โ”€ core/                 # Analysis logic
โ”‚   โ”‚   โ”œโ”€โ”€ analyzers.py      # Aubio wrappers
โ”‚   โ”‚   โ”œโ”€โ”€ evaluation.py     # Metrics calculation
โ”‚   โ”‚   โ”œโ”€โ”€ ground_truth.py   # Pydantic schemas
โ”‚   โ”‚   โ””โ”€โ”€ thebeat_gen.py    # Signal generation
โ”‚   โ””โ”€โ”€ suites/               # Test suite definitions
โ”œโ”€โ”€ web_api/                  # Litestar REST API
โ”‚   โ”œโ”€โ”€ main.py
โ”‚   โ”œโ”€โ”€ routers.py
โ”‚   โ””โ”€โ”€ plotting.py
โ”œโ”€โ”€ web/                      # React frontend
โ””โ”€โ”€ tests/                    # pytest tests

References

  • aubio - Audio analysis library
  • thebeat - Research-validated signal generation
  • Litestar - Python ASGI framework

License

GPL-3.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 Distribution

aubio_beatcheck-0.1.0.tar.gz (58.7 kB view details)

Uploaded Source

Built Distribution

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

aubio_beatcheck-0.1.0-py3-none-any.whl (63.9 kB view details)

Uploaded Python 3

File details

Details for the file aubio_beatcheck-0.1.0.tar.gz.

File metadata

  • Download URL: aubio_beatcheck-0.1.0.tar.gz
  • Upload date:
  • Size: 58.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for aubio_beatcheck-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e6b92420e505c2c6ff097720c53b1db10a12bc1755e665e31a7f61c7dc880c23
MD5 6de04cfb3d5cd148378db51fe4a30521
BLAKE2b-256 6585bf68af024f0d9b32c4c77a920eac7be1281b1ff7724d7be84fdca0cd3afc

See more details on using hashes here.

Provenance

The following attestation bundles were made for aubio_beatcheck-0.1.0.tar.gz:

Publisher: publish.yml on shauneccles/aubio-beatcheck

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

File details

Details for the file aubio_beatcheck-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for aubio_beatcheck-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1d78c3ddaf204c3665758e1002dd545980e647a62f6a3aee1f80d8678a000262
MD5 8b8f5405a90c79dc1f9e157b66caf124
BLAKE2b-256 9f15cbe6f15432c2f915b8c36ba91b7fe56dd6ed7aae1f97e9b528b387ada34d

See more details on using hashes here.

Provenance

The following attestation bundles were made for aubio_beatcheck-0.1.0-py3-none-any.whl:

Publisher: publish.yml on shauneccles/aubio-beatcheck

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