audioreconstructor 2.0.0__cp39-abi3-win_amd64.whl

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.
@@ -0,0 +1,55 @@
1
+ """Thin Python entrypoint for the native Rust Audioreconstructor CLI."""
2
+
3
+ from __future__ import annotations
4
+
5
+
6
+ # start delvewheel patch
7
+ def _delvewheel_patch_1_13_4():
8
+ import ctypes
9
+ import os
10
+ import platform
11
+ import sys
12
+ libs_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, 'audioreconstructor.libs'))
13
+ is_conda_cpython = platform.python_implementation() == 'CPython' and (hasattr(ctypes.pythonapi, 'Anaconda_GetVersion') or 'packaged by conda-forge' in sys.version)
14
+ if sys.version_info[:2] >= (3, 8) and not is_conda_cpython or sys.version_info[:2] >= (3, 10):
15
+ if os.path.isdir(libs_dir):
16
+ os.add_dll_directory(libs_dir)
17
+ else:
18
+ load_order_filepath = os.path.join(libs_dir, '.load-order-audioreconstructor-2.0.0')
19
+ if os.path.isfile(load_order_filepath):
20
+ import ctypes.wintypes
21
+ with open(os.path.join(libs_dir, '.load-order-audioreconstructor-2.0.0'), encoding='utf-8') as file:
22
+ load_order = file.read().split()
23
+ kernel32 = ctypes.WinDLL('kernel32', use_last_error=True)
24
+ kernel32.LoadLibraryExW.restype = ctypes.wintypes.HMODULE
25
+ kernel32.LoadLibraryExW.argtypes = ctypes.wintypes.LPCWSTR, ctypes.wintypes.HANDLE, ctypes.wintypes.DWORD
26
+ for lib in load_order:
27
+ lib_path = os.path.join(os.path.join(libs_dir, lib))
28
+ if os.path.isfile(lib_path) and not kernel32.LoadLibraryExW(lib_path, None, 8):
29
+ raise OSError('Error loading {}; {}'.format(lib, ctypes.FormatError(ctypes.get_last_error())))
30
+
31
+
32
+ _delvewheel_patch_1_13_4()
33
+ del _delvewheel_patch_1_13_4
34
+ # end delvewheel patch
35
+
36
+ import sys
37
+ from collections.abc import Sequence
38
+ from typing import NoReturn
39
+
40
+ from audioreconstructor._core import cli_version
41
+ from audioreconstructor._core import run_cli as _run_cli
42
+
43
+ __version__: str = cli_version()
44
+ __all__ = ["__version__", "cli_version", "main", "run_cli"]
45
+
46
+
47
+ def run_cli(argv: Sequence[str] | None = None) -> int:
48
+ """Invoke the native Rust CLI in-process and return its exit code."""
49
+ args = list(sys.argv if argv is None else argv)
50
+ return _run_cli(args)
51
+
52
+
53
+ def main(argv: Sequence[str] | None = None) -> NoReturn:
54
+ """Console-script entrypoint for `audioreconstructor`."""
55
+ raise SystemExit(run_cli(argv))
@@ -0,0 +1,6 @@
1
+ """Module entrypoint supporting `python -m audioreconstructor`."""
2
+
3
+ from . import main
4
+
5
+ if __name__ == "__main__":
6
+ main()
Binary file
@@ -0,0 +1,2 @@
1
+ def run_cli(argv: list[str]) -> int: ...
2
+ def cli_version() -> str: ...
File without changes
@@ -0,0 +1,2 @@
1
+ Version: 1.13.4
2
+ Arguments: ['C:\\hostedtoolcache\\windows\\Python\\3.12.10\\x64\\Scripts\\delvewheel', 'repair', '--add-path', 'C:\\libsndfile\\bin', '-w', 'crates\\python-bindings\\dist-repaired', 'crates\\python-bindings\\dist\\*.whl']
@@ -0,0 +1,121 @@
1
+ Metadata-Version: 2.4
2
+ Name: audioreconstructor
3
+ Version: 2.0.0
4
+ Classifier: Development Status :: 4 - Beta
5
+ Classifier: Environment :: Console
6
+ Classifier: License :: OSI Approved :: MIT License
7
+ Classifier: Operating System :: MacOS :: MacOS X
8
+ Classifier: Operating System :: Microsoft :: Windows
9
+ Classifier: Operating System :: POSIX :: Linux
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.10
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Classifier: Programming Language :: Rust
16
+ Classifier: Topic :: Multimedia :: Sound/Audio
17
+ Summary: Command-line audio reconstruction powered by the native Rust Audioreconstruction ONNX engine
18
+ Keywords: audio,onnx,super-resolution,cli,rust
19
+ Author-email: Rohan Prasen Kedari <rohanprasenkedari@gmail.com>
20
+ License-Expression: MIT
21
+ Requires-Python: >=3.10
22
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
23
+ Project-URL: Homepage, https://github.com/rohan-prasen/audioreconstruction
24
+ Project-URL: Issues, https://github.com/rohan-prasen/audioreconstruction/issues
25
+ Project-URL: Repository, https://github.com/rohan-prasen/audioreconstruction
26
+
27
+ # audioreconstructor
28
+
29
+ `audioreconstructor` is the native Rust command-line tool for Audioreconstruction's
30
+ ONNX audio super-resolution model, packaged for Python via Maturin and PyO3 (`abi3-py39`)
31
+ with zero third-party Python runtime dependencies.
32
+
33
+ The compiled extension runs audio decoding, resampling, ONNX inference, exact metadata
34
+ preservation, and the inline terminal UI in-process in Rust — no PyInstaller bundle,
35
+ no SciPy/NumPy runtime, and no per-file subprocess spawning.
36
+
37
+ ## Install
38
+
39
+ ```bash
40
+ pip install audioreconstructor
41
+ audioreconstructor setup
42
+ ```
43
+
44
+ `setup` downloads `model.onnx`, `config.json`, and the platform ONNX Runtime shared
45
+ library from the GitHub Release matching the installed package version
46
+ (`audioreconstructor-v<version>`), verifies SHA-256 digests and byte sizes against
47
+ `manifest.json`, and caches them locally per version.
48
+
49
+ Supported platforms: 64-bit Linux (`x86_64`), 64-bit Windows (`x86_64`), and macOS
50
+ (Apple Silicon `arm64` and Intel `x86_64`). Python `>=3.10` is supported via a single
51
+ `abi3` wheel per platform.
52
+
53
+ ## Use
54
+
55
+ Enhance a single file (writes `<stem>_reconstructed.flac` next to the input):
56
+
57
+ ```bash
58
+ audioreconstructor enhance song.mp3
59
+ # -> ./song_reconstructed.flac
60
+ ```
61
+
62
+ Use explicit `--input` and `--output` when you want a custom destination:
63
+
64
+ ```bash
65
+ audioreconstructor enhance --input song.mp3 --output master/song.flac
66
+ ```
67
+
68
+ Enhance an entire folder recursively:
69
+
70
+ ```bash
71
+ audioreconstructor enhance --folder ./album
72
+ ```
73
+
74
+ Reconstructed files are written into a mirrored `<folder>_enhanced` directory tree with
75
+ `_enhanced` appended to every nested subfolder and `_reconstructed.flac` appended to
76
+ every filename — e.g. `album/disc1/track.mp3` → `album_enhanced/disc1_enhanced/track_reconstructed.flac`.
77
+ The ONNX model is loaded once and reused across every file in the batch.
78
+
79
+ Select an execution provider explicitly when needed:
80
+
81
+ ```bash
82
+ audioreconstructor enhance song.mp3 --provider cpu
83
+ ```
84
+
85
+ `auto` is the default (`CoreML` → `CPU` on macOS, `DirectML` → `CPU` on Windows, `CPU`
86
+ on Linux). Both `audioreconstructor ...` and `python -m audioreconstructor ...` invoke
87
+ the same native Rust CLI.
88
+
89
+ ## Verify installation
90
+
91
+ ```bash
92
+ audioreconstructor doctor
93
+ ```
94
+
95
+ `doctor` verifies the cached `manifest.json`, SHA-256 checksums for all cached assets,
96
+ and runs an in-process synthetic stereo ONNX reconstruction self-test. Exits `0` when
97
+ healthy and `1` otherwise.
98
+
99
+ ## Cache locations
100
+
101
+ `setup` caches versioned assets under:
102
+
103
+ - Linux: `$XDG_CACHE_HOME/audioreconstructor/<version>` or `~/.cache/audioreconstructor/<version>`
104
+ - Windows: `%LOCALAPPDATA%\audioreconstructor\Cache\<version>`
105
+ - macOS: `~/Library/Caches/audioreconstructor/<version>`
106
+
107
+ Upgrading and re-running `setup` automatically prunes older cached version directories
108
+ once the new assets are verified. Override locations for offline/local workflows with
109
+ `--cache-dir`, `--model`, `--config`, `--ort` (or `AUDIORECONSTRUCTOR_*` env vars).
110
+
111
+ ## Local development
112
+
113
+ Building from source requires Rust and `libsndfile` (`libsndfile1-dev` + `pkg-config`
114
+ on Debian/Ubuntu, or Homebrew `libsndfile` on macOS):
115
+
116
+ ```bash
117
+ uv sync --locked
118
+ uv run audioreconstructor --version
119
+ uv run pytest crates/python-bindings/tests
120
+ ```
121
+
@@ -0,0 +1,13 @@
1
+ audioreconstructor/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ audioreconstructor/_core.pyd,sha256=hu-BJv5eaGJAVprTMDGT0mfv01k3xFRHIrYa4e4--aw,5143040
3
+ audioreconstructor/_core.pyi,sha256=Ii9SK74Mu-Rl08zdshtoR1S9Dsz63zNhjWUbAecDgLA,73
4
+ audioreconstructor/__init__.py,sha256=M7cmmyHVGo6hv_LW_Da8kkQnRIUlwwx0Rs2jtAQbcbM,2392
5
+ audioreconstructor/__main__.py,sha256=txtBFb3HZUxxSd1QmpkHA27kZnUD1W8iaxEcUivjrek,132
6
+ audioreconstructor-2.0.0.dist-info/DELVEWHEEL,sha256=3nThkRqIk0aHQT_1PHRWmtBkwISHukTgkLssOfucKME,238
7
+ audioreconstructor-2.0.0.dist-info/entry_points.txt,sha256=65Yk3aL_Ly9kvWZYpo5xLSNjjLtsNsEnsqHlVFWaQ0g,61
8
+ audioreconstructor-2.0.0.dist-info/METADATA,sha256=n8XPfgQfg7KKdzH7U1SGg99sqwzCRQpfSDlqI5Yez24,4566
9
+ audioreconstructor-2.0.0.dist-info/RECORD,,
10
+ audioreconstructor-2.0.0.dist-info/WHEEL,sha256=xw8F9xBWUOgm5ym2S9tihj_bLJOb723bjhA0kdANo2I,95
11
+ audioreconstructor-2.0.0.dist-info/sboms/audioreconstructor-native.cyclonedx.json,sha256=1PkZ7o4pWygF65qoa67YWGqxCC5IWg2hdlkkZ8ddyjE,264739
12
+ audioreconstructor.libs/.load-order-audioreconstructor-2.0.0,sha256=a6Pbm4wh9QoMIt6ijdLO945Njg5mlfcbkgCz4lK4W-s,45
13
+ audioreconstructor.libs/sndfile-4e3bd2de8e1485110eaebef8e1239471.dll,sha256=TjvS3o4UhREOrr744SOUcfc9YIdzgxwyO_Uo4FZFZV4,2603520
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.16.0)
3
+ Root-Is-Purelib: false
4
+ Tag: cp39-abi3-win_amd64
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ audioreconstructor=audioreconstructor:main