Skip to main content

Audio Super Resolution

PyPI version CI License: MIT

Audio Super Resolution is a Python CLI and library for audio super-resolution and bandwidth extension. It ships with a deterministic sinc-resample baseline, optional external AudioSR support, and managed metadata for self-contained model backends.

The baseline package stays lightweight: normal inference is offline, model downloads are explicit, and heavyweight model dependencies live behind optional extras.

Features

  • CLI and Python API for single files, directory batches, dry runs, and recursive path-preserving output.
  • Pluggable backend registry with sinc-resample, optional audiosr, and experimental lavasr-compat.
  • Shared inference config for device, precision, chunking, preprocessing, seeds, and model cache paths.
  • Import-light accelerator and runtime-provider metadata for CPU/CUDA/ROCm/XPU/MPS/DirectML planning.
  • JSON run manifests, manifest comparison, and quality reports for regression workflows.
  • Optional benchmark JSON reports for local accelerator/runtime validation.
  • Explicit local weight resolution with multi-file manifests, size/SHA256 checks, and opt-in Hugging Face downloads.
  • Pixi tasks for repeatable lint, format, typecheck, test, build, and package validation commands.

Installation

Install from PyPI:

uv pip install audio-super-resolution

Install optional model/runtime extras only when needed. For example, LavaSR-compatible inference with managed Hugging Face downloads uses:

uv pip install "audio-super-resolution[lavasr,download]"

Install the unreleased repository version from GitHub:

uv pip install "audio-super-resolution @ git+https://github.com/Tinnci/python-audio-super-resolution.git"

GitHub installs can include extras:

uv pip install "audio-super-resolution[lavasr,download] @ git+https://github.com/Tinnci/python-audio-super-resolution.git"

For local development:

git clone https://github.com/Tinnci/python-audio-super-resolution.git
cd python-audio-super-resolution
pixi install

Optional extras:

Extra Purpose
audiosr External AudioSR wrapper. Use Python 3.10 because upstream dependencies are older.
download Hugging Face model weight downloads.
weights Optional safetensors loading helpers.
lavasr Torch runtime for the experimental LavaSR-compatible backend.

CLI Quick Start

Enhance one file:

audio-super-res input.wav output.wav --target-sr 48000

If output.wav is omitted, the CLI writes next to the input as input-sr48000.wav.

Batch process a directory:

audio-super-res ./low-res-audio ./enhanced-audio --recursive --target-sr 48000

Preview or record a run:

audio-super-res ./low-res-audio ./enhanced-audio --recursive --dry-run --manifest plan.json
audio-super-res ./low-res-audio ./enhanced-audio --recursive --manifest run.json
audio-super-res --compare-manifests expected.json actual.json

Run a lightweight backend eval over clean references:

audio-super-res eval run --dataset evalsets/speech_clean_48k --backend sinc-resample --work-dir runs/sinc-work --output runs/sinc.json
audio-super-res eval compare runs/sinc.json runs/lavasr.json --output runs/comparison.json

List backends and models:

audio-super-res --list-backends
audio-super-res --list-models --list-format json

Run post-write quality checks:

audio-super-res input.wav output.wav --quality-report --fail-on-quality-issue
audio-super-res input.wav output.wav --quality-report-json quality.json
audio-super-res input.wav output.wav --benchmark-json benchmark.json

The shorter audiosr command is also available as an alias for audio-super-res.

Models And Weights

Current backend status:

Backend Status
sinc-resample Default deterministic baseline.
audiosr Optional external package backend; upstream package owns its checkpoint behavior.
lavasr-compat Experimental self-contained LavaSR v2 BWE path with managed weights. Gated real-weight download, torch smoke, and initial upstream parity validation pass.

Use audio-super-res --list-models --list-format json for machine-readable comparison metadata, including task/domain, input and target sample rates, implementation family, I/O capabilities, accelerator and runtime-provider declarations, weight source/size/license, validation evidence, recommended use, and known limitations.

Accelerator install paths, device=auto behavior, runtime-provider selection, and gated benchmark guidance live in docs/ACCELERATORS.md.

Future model candidates are tracked in the speech and general-audio reviews linked from docs/README.md. Candidate entries are not supported backends until they pass admission and validation.

Managed downloads are explicit. Normal enhancement only uses local verified files unless --download-weights is set:

audio-super-res --backend lavasr-compat --download-weights --prepare-model-cache
audio-super-res --backend lavasr-compat --verify-weights

Use an existing manifest:

audio-super-res input.wav output.wav \
  --backend lavasr-compat \
  --target-sr 48000 \
  --weights-manifest C:\path\to\lavasr-v2-bwe\manifest.json

Run the optional external AudioSR backend:

audio-super-res input.wav output.wav \
  --backend audiosr \
  --target-sr 48000 \
  --model-name basic \
  --device auto

Python API

from audio_super_resolution import AudioSuperResolver

resolver = AudioSuperResolver(target_sr=48000)
result = resolver.enhance("input.wav", "output.wav")

print(result.output_path)
print(result.sample_rate)

Batch planning and manifests:

from audio_super_resolution import InferenceConfig, build_manifest, plan_enhancements

jobs = plan_enhancements("low-res-audio", "enhanced-audio", recursive=True)
manifest = build_manifest("dry-run", jobs, InferenceConfig(), backend="sinc-resample", target_sample_rate=48000)

Managed weights:

from audio_super_resolution import (
    InferenceConfig,
    download_model_weights,
    resolve_model_weights,
    verify_model_weights,
)

download_model_weights("lavasr-v2-bwe")
verified = verify_model_weights("lavasr-v2-bwe")
weights = resolve_model_weights("lavasr-v2-bwe", InferenceConfig(model_cache_dir=verified.root_dir.parent))
model_path = weights.path_for("enhancer_v2/pytorch_model.bin")

Development

pixi run lint
pixi run format-check
pixi run typecheck
pixi run test
pixi run build
pixi run metadata-check
pixi run wheel-check

Run optional real AudioSR integration only when model inference and upstream checkpoint handling are intended:

set AUDIO_SUPER_RESOLUTION_RUN_AUDIOSR_INTEGRATION=1
pixi run pytest tests/test_audiosr_integration.py

Real LavaSR weight download and torch smoke tests are also gated; see tests/README.md.

Docker

docker build -t audio-super-resolution .
docker run --rm -v "%cd%":/workdir audio-super-resolution input.wav output.wav --target-sr 48000

On Unix-like shells, use -v "$PWD":/workdir.

Project Docs

Requirements

  • Python 3.10 or newer
  • Pixi 0.70 or newer for development; the committed pixi.lock uses lock-file version 7.
  • libsndfile-compatible audio files for the default reader/writer

License

This project is licensed under the MIT License. See LICENSE for details.

Credits

Inspired by the project structure and user experience of python-audio-separator.

Metadata

Release files for audio-super-resolution 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for audio-super-resolution 0.6.0
File Size Uploaded Provenance Actions
audio_super_resolution-0.6.0.tar.gz 142.7 kB With provenance Details for audio_super_resolution-0.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for audio-super-resolution 0.6.0
File Interpreter ABI Platform Actions
audio_super_resolution-0.6.0-py3-none-any.whl Python 3 none any Details for audio_super_resolution-0.6.0-py3-none-any.whl

Total release size: 229.1 kB

Release files / audio_super_resolution-0.6.0.tar.gz

Download URL audio_super_resolution-0.6.0.tar.gz
Size 142.7 kB
Tags Source
SHA-256 checksum
How to use checksums
80d36948ab91a678ff5c935a40fffb9e01ed56313f42c0012f87a9f04403595e
BLAKE2b-256 checksum
How to use checksums
588810e62100b343a2bd3d9cb14150598c5b29dcf6669855dfead9f655e4115f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 12, 2026.

Transparency log

Release files / audio_super_resolution-0.6.0-py3-none-any.whl

Download URL audio_super_resolution-0.6.0-py3-none-any.whl
Size 86.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d2d3335edc0ab5de71f64314ef9eff6c372ad47ebaf369e67d5cab40c219cf10
BLAKE2b-256 checksum
How to use checksums
10fde7907668481dd0203d75aa432a08cff7438f6acf5184b1afd0fd5d37259f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 12, 2026.

Transparency log

Security for audio-super-resolution 0.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for audio_super_resolution-0.6.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 12, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page