audio-super-resolution 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- audio_super_resolution-0.1.0/.dockerignore +10 -0
- audio_super_resolution-0.1.0/.gitattributes +7 -0
- audio_super_resolution-0.1.0/.github/ISSUE_TEMPLATE/BUG_REPORT.yml +58 -0
- audio_super_resolution-0.1.0/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml +37 -0
- audio_super_resolution-0.1.0/.github/dependabot.yml +11 -0
- audio_super_resolution-0.1.0/.github/workflows/ci.yml +19 -0
- audio_super_resolution-0.1.0/.github/workflows/release.yml +24 -0
- audio_super_resolution-0.1.0/.github/workflows/security.yml +21 -0
- audio_super_resolution-0.1.0/.gitignore +11 -0
- audio_super_resolution-0.1.0/CHANGELOG.md +29 -0
- audio_super_resolution-0.1.0/Dockerfile +16 -0
- audio_super_resolution-0.1.0/LICENSE +21 -0
- audio_super_resolution-0.1.0/PKG-INFO +248 -0
- audio_super_resolution-0.1.0/README.md +208 -0
- audio_super_resolution-0.1.0/ROADMAP.md +67 -0
- audio_super_resolution-0.1.0/docs/ARCHITECTURE.md +122 -0
- audio_super_resolution-0.1.0/docs/COLAB.md +50 -0
- audio_super_resolution-0.1.0/docs/RELEASE.md +57 -0
- audio_super_resolution-0.1.0/docs/RELEASE_DRY_RUN_0.1.0.md +39 -0
- audio_super_resolution-0.1.0/examples/artifacts/README.md +9 -0
- audio_super_resolution-0.1.0/examples/artifacts/sample-completed-manifest.json +56 -0
- audio_super_resolution-0.1.0/examples/artifacts/sample-plan-manifest.json +30 -0
- audio_super_resolution-0.1.0/examples/artifacts/sample-quality-report.json +23 -0
- audio_super_resolution-0.1.0/examples/basic_usage.py +25 -0
- audio_super_resolution-0.1.0/examples/batch_process.py +26 -0
- audio_super_resolution-0.1.0/examples/compare_manifests.py +28 -0
- audio_super_resolution-0.1.0/examples/quality_check.py +26 -0
- audio_super_resolution-0.1.0/pixi.lock +2650 -0
- audio_super_resolution-0.1.0/pyproject.toml +98 -0
- audio_super_resolution-0.1.0/src/audio_super_resolution/__init__.py +142 -0
- audio_super_resolution-0.1.0/src/audio_super_resolution/audiosr_backend.py +17 -0
- audio_super_resolution-0.1.0/src/audio_super_resolution/backends/__init__.py +32 -0
- audio_super_resolution-0.1.0/src/audio_super_resolution/backends/audiosr_external.py +128 -0
- audio_super_resolution-0.1.0/src/audio_super_resolution/backends/base.py +68 -0
- audio_super_resolution-0.1.0/src/audio_super_resolution/backends/lavasr_compat.py +83 -0
- audio_super_resolution-0.1.0/src/audio_super_resolution/backends/registry.py +75 -0
- audio_super_resolution-0.1.0/src/audio_super_resolution/backends/sinc.py +48 -0
- audio_super_resolution-0.1.0/src/audio_super_resolution/chunking.py +155 -0
- audio_super_resolution-0.1.0/src/audio_super_resolution/cli.py +527 -0
- audio_super_resolution-0.1.0/src/audio_super_resolution/config.py +125 -0
- audio_super_resolution-0.1.0/src/audio_super_resolution/devices.py +65 -0
- audio_super_resolution-0.1.0/src/audio_super_resolution/downloads.py +200 -0
- audio_super_resolution-0.1.0/src/audio_super_resolution/manifest.py +318 -0
- audio_super_resolution-0.1.0/src/audio_super_resolution/model_weights.py +69 -0
- audio_super_resolution-0.1.0/src/audio_super_resolution/models.py +121 -0
- audio_super_resolution-0.1.0/src/audio_super_resolution/preprocess.py +55 -0
- audio_super_resolution-0.1.0/src/audio_super_resolution/quality.py +129 -0
- audio_super_resolution-0.1.0/src/audio_super_resolution/resolver.py +319 -0
- audio_super_resolution-0.1.0/src/audio_super_resolution/specs.py +66 -0
- audio_super_resolution-0.1.0/src/audio_super_resolution/weight_store.py +156 -0
- audio_super_resolution-0.1.0/src/audio_super_resolution/weights.py +279 -0
- audio_super_resolution-0.1.0/tests/README.md +28 -0
- audio_super_resolution-0.1.0/tests/test_architecture.py +34 -0
- audio_super_resolution-0.1.0/tests/test_audiosr_backend.py +103 -0
- audio_super_resolution-0.1.0/tests/test_audiosr_integration.py +53 -0
- audio_super_resolution-0.1.0/tests/test_chunking.py +38 -0
- audio_super_resolution-0.1.0/tests/test_cli.py +411 -0
- audio_super_resolution-0.1.0/tests/test_config.py +75 -0
- audio_super_resolution-0.1.0/tests/test_devices.py +18 -0
- audio_super_resolution-0.1.0/tests/test_manifest.py +113 -0
- audio_super_resolution-0.1.0/tests/test_models.py +55 -0
- audio_super_resolution-0.1.0/tests/test_preprocess.py +55 -0
- audio_super_resolution-0.1.0/tests/test_quality.py +90 -0
- audio_super_resolution-0.1.0/tests/test_release_artifacts.py +35 -0
- audio_super_resolution-0.1.0/tests/test_resolver.py +148 -0
- audio_super_resolution-0.1.0/tests/test_weight_store.py +175 -0
- audio_super_resolution-0.1.0/tests/test_weights.py +116 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
name: Bug report
|
|
2
|
+
description: Report a problem with the CLI, Python API, packaging, or backend behavior
|
|
3
|
+
title: "[Bug]: "
|
|
4
|
+
labels: ["bug"]
|
|
5
|
+
body:
|
|
6
|
+
- type: textarea
|
|
7
|
+
id: description
|
|
8
|
+
attributes:
|
|
9
|
+
label: Describe the bug
|
|
10
|
+
description: Provide a concise description of what failed and what you expected.
|
|
11
|
+
placeholder: What happened?
|
|
12
|
+
validations:
|
|
13
|
+
required: true
|
|
14
|
+
- type: checkboxes
|
|
15
|
+
id: searched
|
|
16
|
+
attributes:
|
|
17
|
+
label: Existing issues
|
|
18
|
+
description: Please search existing issues before filing a new report.
|
|
19
|
+
options:
|
|
20
|
+
- label: I have searched and found no existing issue for this problem.
|
|
21
|
+
required: true
|
|
22
|
+
- type: textarea
|
|
23
|
+
id: command
|
|
24
|
+
attributes:
|
|
25
|
+
label: Command or code
|
|
26
|
+
description: Paste the exact command or minimal Python snippet that reproduces the issue.
|
|
27
|
+
render: shell
|
|
28
|
+
validations:
|
|
29
|
+
required: true
|
|
30
|
+
- type: textarea
|
|
31
|
+
id: logs
|
|
32
|
+
attributes:
|
|
33
|
+
label: Logs
|
|
34
|
+
description: Include the full error output or stack trace.
|
|
35
|
+
render: shell
|
|
36
|
+
- type: textarea
|
|
37
|
+
id: system
|
|
38
|
+
attributes:
|
|
39
|
+
label: System information
|
|
40
|
+
description: Run `audio-super-res --env-info` and paste the output here.
|
|
41
|
+
render: shell
|
|
42
|
+
validations:
|
|
43
|
+
required: true
|
|
44
|
+
- type: dropdown
|
|
45
|
+
id: backend
|
|
46
|
+
attributes:
|
|
47
|
+
label: Backend
|
|
48
|
+
options:
|
|
49
|
+
- sinc-resample
|
|
50
|
+
- audiosr
|
|
51
|
+
- other / not sure
|
|
52
|
+
validations:
|
|
53
|
+
required: true
|
|
54
|
+
- type: textarea
|
|
55
|
+
id: additional
|
|
56
|
+
attributes:
|
|
57
|
+
label: Additional context
|
|
58
|
+
description: Add any other useful information here.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: Feature request
|
|
2
|
+
description: Suggest an enhancement or new backend
|
|
3
|
+
title: "[Feature]: "
|
|
4
|
+
labels: ["enhancement"]
|
|
5
|
+
body:
|
|
6
|
+
- type: textarea
|
|
7
|
+
id: problem
|
|
8
|
+
attributes:
|
|
9
|
+
label: Problem or use case
|
|
10
|
+
description: Describe the workflow or limitation this feature should address.
|
|
11
|
+
placeholder: I want to...
|
|
12
|
+
validations:
|
|
13
|
+
required: true
|
|
14
|
+
- type: textarea
|
|
15
|
+
id: proposal
|
|
16
|
+
attributes:
|
|
17
|
+
label: Proposed solution
|
|
18
|
+
description: Describe the behavior, API, or CLI you would like.
|
|
19
|
+
validations:
|
|
20
|
+
required: true
|
|
21
|
+
- type: textarea
|
|
22
|
+
id: alternatives
|
|
23
|
+
attributes:
|
|
24
|
+
label: Alternatives considered
|
|
25
|
+
description: Note any workaround or alternative backend you considered.
|
|
26
|
+
- type: dropdown
|
|
27
|
+
id: area
|
|
28
|
+
attributes:
|
|
29
|
+
label: Area
|
|
30
|
+
options:
|
|
31
|
+
- CLI
|
|
32
|
+
- Python API
|
|
33
|
+
- backend
|
|
34
|
+
- packaging
|
|
35
|
+
- documentation
|
|
36
|
+
- testing
|
|
37
|
+
- other
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v6
|
|
15
|
+
- uses: prefix-dev/setup-pixi@v0.9.6
|
|
16
|
+
with:
|
|
17
|
+
pixi-version: v0.63.2
|
|
18
|
+
- run: pixi run lint
|
|
19
|
+
- run: pixi run test
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
id-token: write
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
publish:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
environment: pypi
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v6
|
|
18
|
+
- uses: prefix-dev/setup-pixi@v0.9.6
|
|
19
|
+
with:
|
|
20
|
+
pixi-version: v0.63.2
|
|
21
|
+
- run: pixi run lint
|
|
22
|
+
- run: pixi run test
|
|
23
|
+
- run: pixi run build
|
|
24
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
name: Security
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
branches: [main]
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
security-events: write
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
codeql:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v6
|
|
18
|
+
- uses: github/codeql-action/init@v4
|
|
19
|
+
with:
|
|
20
|
+
languages: python
|
|
21
|
+
- uses: github/codeql-action/analyze@v4
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
This project follows semantic versioning once published to PyPI.
|
|
6
|
+
|
|
7
|
+
## 0.1.0
|
|
8
|
+
|
|
9
|
+
- Added the initial Pixi-managed Python package.
|
|
10
|
+
- Added `audio-super-res` and `audiosr` CLI entry points.
|
|
11
|
+
- Added single-file and recursive directory batch processing.
|
|
12
|
+
- Added explicit chunked processing with overlap crossfading for long files.
|
|
13
|
+
- Added backend selection with the baseline `sinc-resample` backend.
|
|
14
|
+
- Added inference configuration for device, precision, chunking, seed, and model cache path.
|
|
15
|
+
- Added audio quality checks for sample rate, duration drift, clipping, and peak level.
|
|
16
|
+
- Added standalone JSON quality report export through `--quality-report-json`.
|
|
17
|
+
- Added examples for single-file enhancement, batch processing, and quality checks.
|
|
18
|
+
- Added the optional `audiosr` backend wrapper for AudioSR latent diffusion inference.
|
|
19
|
+
- Added an environment-gated real AudioSR integration test.
|
|
20
|
+
- Added backend availability metadata and JSON output for `--list-backends`.
|
|
21
|
+
- Added model catalog output through `--list-models`.
|
|
22
|
+
- Added JSON manifests for dry-run plans and completed enhancement runs.
|
|
23
|
+
- Added manifest regression comparison through `--compare-manifests`.
|
|
24
|
+
- Added optional low-pass preprocessing for model-backed enhancement runs.
|
|
25
|
+
- Added managed weight manifests, local cache verification, and explicit Hugging Face download plumbing.
|
|
26
|
+
- Added LavaSR-compatible managed weight metadata while keeping self-contained LavaSR inference marked as pending.
|
|
27
|
+
- Added PyPI Trusted Publishing / GitHub OIDC release workflow configuration.
|
|
28
|
+
- Added release dry-run notes, a Colab plan, and sample JSON artifacts.
|
|
29
|
+
- Added GitHub issue templates, Dependabot configuration, CodeQL security workflow, and architecture/test documentation.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
FROM python:3.12-slim
|
|
2
|
+
|
|
3
|
+
RUN apt-get update \
|
|
4
|
+
&& apt-get install -y --no-install-recommends libsndfile1 \
|
|
5
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
6
|
+
|
|
7
|
+
WORKDIR /app
|
|
8
|
+
|
|
9
|
+
COPY pyproject.toml README.md LICENSE ./
|
|
10
|
+
COPY src ./src
|
|
11
|
+
|
|
12
|
+
RUN pip install --no-cache-dir .
|
|
13
|
+
|
|
14
|
+
WORKDIR /workdir
|
|
15
|
+
|
|
16
|
+
ENTRYPOINT ["audio-super-res"]
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 SiTinc
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: audio-super-resolution
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Easy to use audio super-resolution and bandwidth extension from CLI or as a Python package.
|
|
5
|
+
Project-URL: Homepage, https://github.com/Tinnci/python-audio-super-resolution
|
|
6
|
+
Project-URL: Repository, https://github.com/Tinnci/python-audio-super-resolution
|
|
7
|
+
Project-URL: Documentation, https://github.com/Tinnci/python-audio-super-resolution/blob/main/README.md
|
|
8
|
+
Project-URL: Issues, https://github.com/Tinnci/python-audio-super-resolution/issues
|
|
9
|
+
Author: SiTinc
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: audio,audiosr,bandwidth-extension,music,speech,super-resolution
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Intended Audience :: Science/Research
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
23
|
+
Classifier: Topic :: Multimedia :: Sound/Audio
|
|
24
|
+
Classifier: Topic :: Multimedia :: Sound/Audio :: Analysis
|
|
25
|
+
Requires-Python: >=3.10
|
|
26
|
+
Requires-Dist: numpy>=1.23.5
|
|
27
|
+
Requires-Dist: scipy>=1.11
|
|
28
|
+
Requires-Dist: soundfile>=0.12
|
|
29
|
+
Requires-Dist: tqdm>=4.66
|
|
30
|
+
Provides-Extra: audiosr
|
|
31
|
+
Requires-Dist: audiosr==0.0.7; extra == 'audiosr'
|
|
32
|
+
Provides-Extra: download
|
|
33
|
+
Requires-Dist: huggingface-hub>=0.24; extra == 'download'
|
|
34
|
+
Provides-Extra: lavasr
|
|
35
|
+
Requires-Dist: pyyaml>=6; extra == 'lavasr'
|
|
36
|
+
Requires-Dist: torch>=2; extra == 'lavasr'
|
|
37
|
+
Provides-Extra: weights
|
|
38
|
+
Requires-Dist: safetensors>=0.4; extra == 'weights'
|
|
39
|
+
Description-Content-Type: text/markdown
|
|
40
|
+
|
|
41
|
+
<div align="center">
|
|
42
|
+
|
|
43
|
+
# Audio Super Resolution
|
|
44
|
+
|
|
45
|
+
[](https://badge.fury.io/py/audio-super-resolution)
|
|
46
|
+
[](https://github.com/Tinnci/python-audio-super-resolution/actions/workflows/ci.yml)
|
|
47
|
+
[](LICENSE)
|
|
48
|
+
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
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.
|
|
52
|
+
|
|
53
|
+
The baseline package stays lightweight: normal inference is offline, model downloads are explicit, and heavyweight model dependencies live behind optional extras.
|
|
54
|
+
|
|
55
|
+
## Features
|
|
56
|
+
|
|
57
|
+
- CLI and Python API for single files, directory batches, dry runs, and recursive path-preserving output.
|
|
58
|
+
- Pluggable backend registry with `sinc-resample`, optional `audiosr`, and LavaSR-compatible managed weight metadata.
|
|
59
|
+
- Shared inference config for device, precision, chunking, preprocessing, seeds, and model cache paths.
|
|
60
|
+
- JSON run manifests, manifest comparison, and quality reports for regression workflows.
|
|
61
|
+
- Explicit local weight resolution with multi-file manifests, size/SHA256 checks, and opt-in Hugging Face downloads.
|
|
62
|
+
- Pixi tasks for repeatable test, lint, format, and build commands.
|
|
63
|
+
|
|
64
|
+
## Installation
|
|
65
|
+
|
|
66
|
+
Install from GitHub:
|
|
67
|
+
|
|
68
|
+
```sh
|
|
69
|
+
pip install git+https://github.com/Tinnci/python-audio-super-resolution.git
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
For local development:
|
|
73
|
+
|
|
74
|
+
```sh
|
|
75
|
+
git clone https://github.com/Tinnci/python-audio-super-resolution.git
|
|
76
|
+
cd python-audio-super-resolution
|
|
77
|
+
pixi install
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Optional extras:
|
|
81
|
+
|
|
82
|
+
| Extra | Purpose |
|
|
83
|
+
| --- | --- |
|
|
84
|
+
| `audiosr` | External AudioSR wrapper. Use Python 3.10 because upstream dependencies are older. |
|
|
85
|
+
| `download` | Hugging Face model weight downloads. |
|
|
86
|
+
| `weights` | Optional safetensors loading helpers. |
|
|
87
|
+
| `lavasr` | LavaSR-compatible runtime dependencies. Inference is not implemented yet. |
|
|
88
|
+
|
|
89
|
+
Example:
|
|
90
|
+
|
|
91
|
+
```sh
|
|
92
|
+
pip install "audio-super-resolution[lavasr,download] @ git+https://github.com/Tinnci/python-audio-super-resolution.git"
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## CLI Quick Start
|
|
96
|
+
|
|
97
|
+
Enhance one file:
|
|
98
|
+
|
|
99
|
+
```sh
|
|
100
|
+
audio-super-res input.wav output.wav --target-sr 48000
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
If `output.wav` is omitted, the CLI writes next to the input as `input-sr48000.wav`.
|
|
104
|
+
|
|
105
|
+
Batch process a directory:
|
|
106
|
+
|
|
107
|
+
```sh
|
|
108
|
+
audio-super-res ./low-res-audio ./enhanced-audio --recursive --target-sr 48000
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Preview or record a run:
|
|
112
|
+
|
|
113
|
+
```sh
|
|
114
|
+
audio-super-res ./low-res-audio ./enhanced-audio --recursive --dry-run --manifest plan.json
|
|
115
|
+
audio-super-res ./low-res-audio ./enhanced-audio --recursive --manifest run.json
|
|
116
|
+
audio-super-res --compare-manifests expected.json actual.json
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
List backends and models:
|
|
120
|
+
|
|
121
|
+
```sh
|
|
122
|
+
audio-super-res --list-backends
|
|
123
|
+
audio-super-res --list-models --list-format json
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Run post-write quality checks:
|
|
127
|
+
|
|
128
|
+
```sh
|
|
129
|
+
audio-super-res input.wav output.wav --quality-report --fail-on-quality-issue
|
|
130
|
+
audio-super-res input.wav output.wav --quality-report-json quality.json
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
The shorter `audiosr` command is also available as an alias for `audio-super-res`.
|
|
134
|
+
|
|
135
|
+
## Models And Weights
|
|
136
|
+
|
|
137
|
+
Current backend status:
|
|
138
|
+
|
|
139
|
+
| Backend | Status |
|
|
140
|
+
| --- | --- |
|
|
141
|
+
| `sinc-resample` | Default deterministic baseline. |
|
|
142
|
+
| `audiosr` | Optional external package backend; upstream package owns its checkpoint behavior. |
|
|
143
|
+
| `lavasr-compat` | LavaSR v2 BWE download and verification are wired; self-contained inference is pending. |
|
|
144
|
+
|
|
145
|
+
Managed downloads are explicit. Normal enhancement only uses local verified files unless `--download-weights` is set:
|
|
146
|
+
|
|
147
|
+
```sh
|
|
148
|
+
audio-super-res --backend lavasr-compat --download-weights --prepare-model-cache
|
|
149
|
+
audio-super-res --backend lavasr-compat --verify-weights
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Use an existing manifest:
|
|
153
|
+
|
|
154
|
+
```sh
|
|
155
|
+
audio-super-res input.wav output.wav \
|
|
156
|
+
--backend lavasr-compat \
|
|
157
|
+
--target-sr 48000 \
|
|
158
|
+
--weights-manifest C:\path\to\lavasr-v2-bwe\manifest.json
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Run the optional external AudioSR backend:
|
|
162
|
+
|
|
163
|
+
```sh
|
|
164
|
+
audio-super-res input.wav output.wav \
|
|
165
|
+
--backend audiosr \
|
|
166
|
+
--target-sr 48000 \
|
|
167
|
+
--model-name basic \
|
|
168
|
+
--device auto
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
## Python API
|
|
172
|
+
|
|
173
|
+
```python
|
|
174
|
+
from audio_super_resolution import AudioSuperResolver
|
|
175
|
+
|
|
176
|
+
resolver = AudioSuperResolver(target_sr=48000)
|
|
177
|
+
result = resolver.enhance("input.wav", "output.wav")
|
|
178
|
+
|
|
179
|
+
print(result.output_path)
|
|
180
|
+
print(result.sample_rate)
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Batch planning and manifests:
|
|
184
|
+
|
|
185
|
+
```python
|
|
186
|
+
from audio_super_resolution import InferenceConfig, build_manifest, plan_enhancements
|
|
187
|
+
|
|
188
|
+
jobs = plan_enhancements("low-res-audio", "enhanced-audio", recursive=True)
|
|
189
|
+
manifest = build_manifest("dry-run", jobs, InferenceConfig(), backend="sinc-resample", target_sample_rate=48000)
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Managed weights:
|
|
193
|
+
|
|
194
|
+
```python
|
|
195
|
+
from audio_super_resolution import InferenceConfig, download_model_weights, resolve_model_weights, verify_model_weights
|
|
196
|
+
|
|
197
|
+
download_model_weights("lavasr-v2-bwe")
|
|
198
|
+
verified = verify_model_weights("lavasr-v2-bwe")
|
|
199
|
+
weights = resolve_model_weights("lavasr-v2-bwe", InferenceConfig(model_cache_dir=verified.root_dir.parent))
|
|
200
|
+
model_path = weights.path_for("enhancer_v2/pytorch_model.bin")
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
## Development
|
|
204
|
+
|
|
205
|
+
```sh
|
|
206
|
+
pixi run test
|
|
207
|
+
pixi run lint
|
|
208
|
+
pixi run format
|
|
209
|
+
pixi run build
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
Run optional real AudioSR integration only when model inference and upstream checkpoint handling are intended:
|
|
213
|
+
|
|
214
|
+
```sh
|
|
215
|
+
set AUDIO_SUPER_RESOLUTION_RUN_AUDIOSR_INTEGRATION=1
|
|
216
|
+
pixi run pytest tests/test_audiosr_integration.py
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
## Docker
|
|
220
|
+
|
|
221
|
+
```sh
|
|
222
|
+
docker build -t audio-super-resolution .
|
|
223
|
+
docker run --rm -v "%cd%":/workdir audio-super-resolution input.wav output.wav --target-sr 48000
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
On Unix-like shells, use `-v "$PWD":/workdir`.
|
|
227
|
+
|
|
228
|
+
## Project Docs
|
|
229
|
+
|
|
230
|
+
- [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md): package layers, backend contract, and weight-management boundaries.
|
|
231
|
+
- [ROADMAP.md](ROADMAP.md): current status and next implementation work.
|
|
232
|
+
- [docs/RELEASE.md](docs/RELEASE.md): release checklist and publishing notes.
|
|
233
|
+
- [tests/README.md](tests/README.md): default and optional test strategy.
|
|
234
|
+
- [examples/](examples/): Python examples and sample JSON artifacts.
|
|
235
|
+
|
|
236
|
+
## Requirements
|
|
237
|
+
|
|
238
|
+
- Python 3.10 or newer
|
|
239
|
+
- Pixi for development
|
|
240
|
+
- libsndfile-compatible audio files for the default reader/writer
|
|
241
|
+
|
|
242
|
+
## License
|
|
243
|
+
|
|
244
|
+
This project is licensed under the MIT License. See [LICENSE](LICENSE) for details.
|
|
245
|
+
|
|
246
|
+
## Credits
|
|
247
|
+
|
|
248
|
+
Inspired by the project structure and user experience of [python-audio-separator](https://github.com/nomadkaraoke/python-audio-separator).
|