Skip to main content

Standalone CLI for batch-enhancing lossy audio to FLAC via EchoVault's ONNX model

Project description

echovault-flac-enhancer

Standalone CLI for bulk-enhancing lossy audio (MP3/AAC/OGG/WMA) to FLAC using the same ONNX model EchoVault's desktop app uses, independent of Electron.

Install

pip install echovault-flac-enhancer

Usage

# One-time: download the model and verify everything works
echovault-flac-enhancer --setup

# Check runtime/deps/model status
echovault-flac-enhancer --check

echovault-flac-enhancer --check output

# Enhance a single file
echovault-flac-enhancer --file-name path/to/track.mp3

echovault-flac-enhancer --file-name output

Spectrogram before (MP3) and after (enhanced FLAC) — note the recovered high-frequency content above the MP3's cutoff:

Before (MP3) After (enhanced FLAC)
MP3 spectrogram Enhanced FLAC spectrogram
# Enhance every lossy track in a folder
echovault-flac-enhancer --folder path/to/music [--recursive] [--skip-existing] [--output-dir DIR]

echovault-flac-enhancer --folder output

Outputs are written as <original-stem>.enhanced.flac alongside the source (or under --output-dir, mirroring the source's relative subpath).

The model (~107MB) is cached at:

  • Linux/macOS: ~/.cache/echovault-flac-enhancer/model/
  • Windows: %LOCALAPPDATA%\echovault-flac-enhancer\model\

Development

git clone https://github.com/EchoVaultHQ/EchoVault-FLAC-Enhancer.git
cd EchoVault-FLAC-Enhancer
python -m venv .venv && source .venv/bin/activate
pip install -e .[dev]

ruff check .
black --check .
pytest -m "not slow"   # add -m slow to also run real network/model tests

Non-goals (v1)

  • No GUI — CLI only.
  • No parallel/multi-worker inference (--workers must be 1).
  • No mid-batch resume — re-run with --skip-existing to pick up where a killed batch left off.
  • .m4a files are not auto-globbed by --folder (ambiguous AAC vs. ALAC codec-in-container — pass an .m4a explicitly via --file-name if you're sure it's lossy AAC).

Releasing

Model assets (once per model version)

Before --setup works for end users, a maintainer must create a GitHub Release on this repo and upload model.onnx + config.json as release assets, matching the URL/hashes pinned in echovault_flac_enhancer/data/manifest.json. Verify locally before uploading:

sha256sum model.onnx config.json   # compare against manifest.json's sha256/bytes

If the release tag doesn't match manifest.json's baseUrl, update baseUrl and commit — every installed CLI resolves the download from that field.

Package (PyPI)

Publishing is handled by .github/workflows/publish.yml via PyPI Trusted Publishing (OIDC — no stored token), tied to the pypi GitHub Actions environment.

  • Normal path: bump the version in pyproject.toml and CHANGELOG.md, commit, then publish a GitHub Release for that tag. The release: published event triggers the workflow automatically.
  • One-off / manual path: Actions tab → Publish workflow → Run workflow → branch main. Useful when the version has no release of its own yet (e.g. it already shares a tag with a model-asset release).

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

echovault_flac_enhancer-0.2.0.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

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

echovault_flac_enhancer-0.2.0-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

Details for the file echovault_flac_enhancer-0.2.0.tar.gz.

File metadata

  • Download URL: echovault_flac_enhancer-0.2.0.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for echovault_flac_enhancer-0.2.0.tar.gz
Algorithm Hash digest
SHA256 af2bc7037cdda24719de4a84b17a7ec18006e1faa45e685615797ad9a0ec3a5d
MD5 507c27d98194178c1db651637fc84ed5
BLAKE2b-256 6473dae2eaa104a9028dad6ef7f9e270df0f8679a32537bcb8daacb107fda495

See more details on using hashes here.

Provenance

The following attestation bundles were made for echovault_flac_enhancer-0.2.0.tar.gz:

Publisher: publish.yml on EchoVaultHQ/EchoVault-FLAC-Enhancer

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

File details

Details for the file echovault_flac_enhancer-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for echovault_flac_enhancer-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8ef14009b5e570e333adc5e0be0b36cf9eb2847a506816bc0de488a165c784d0
MD5 4aba98021e39e7237ff9303020873747
BLAKE2b-256 1e422f140279440101024ca22e9c574f6d3e8a8434d42c3fd791e1407264f98a

See more details on using hashes here.

Provenance

The following attestation bundles were made for echovault_flac_enhancer-0.2.0-py3-none-any.whl:

Publisher: publish.yml on EchoVaultHQ/EchoVault-FLAC-Enhancer

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