Skip to main content

Music library health scanner and metadata repair tool

Project description

SoundAudit

A Python-based music library health scanner and metadata repair tool for FLAC/MP3/OGG/M4A collections.

⚠️ Beta — work in progress. Expect rough edges and breaking changes. Back up your library before using the tag writeback features (fix --apply, resolve --auto-write).

What It Does

SoundAudit scans your music library, extracts metadata, fingerprints audio, resolves canonical tags via MusicBrainz, detects transcodes and duplicates, then writes corrections back to your files all via terminal UI or scriptable CLI.

Supported formats: FLAC, MP3, M4A, OGG, WAVE, APE

Feature
Parallel incremental directory scanning
Content-hash duplicate detection
AcoustID fingerprinting + fuzzy duplicates
Spectral transcode detection (fake-FLAC)
MusicBrainz metadata resolver
Tag writeback with original backup
Interactive TUI + JSON/CSV/Markdown export

Quick Start

# Install from PyPI
pip install soundaudit

# Or install from source with uv
uv pip install -e ".[dev]"

# Launch the interactive TUI
soundaudit tui

# Scan your library
soundaudit scan ~/Music --workers 4

# Re-scan only changed files (near-instant)
soundaudit scan ~/Music

# Resolve MusicBrainz metadata + preview fixes
soundaudit resolve
soundaudit fix --fields artist,album,title,year

# Write corrected tags to files
soundaudit fix --apply

# Reports
soundaudit report                              # summary
soundaudit report --missing-tags               # incomplete metadata
soundaudit report --duplicates                 # duplicate groups with keeper recommendations
soundaudit report --transcodes                 # suspected fake-FLAC
soundaudit report --corrupt                    # unreadable files
soundaudit report --duplicates -o dups.json    # export to JSON

# Analysis passes (on already-scanned data)
soundaudit analyze --duplicates                # content-hash dups
soundaudit analyze --acoustid                  # fingerprint dups
soundaudit analyze --transcodes --workers 4    # spectral fake-FLAC detection

Requirements

  • Python 3.10+
  • ffmpeg — required for spectral transcode detection (analyze --transcodes)
  • fpcalc (chromaprint) — optional, for AcoustID fingerprinting (analyze --acoustid)

Hash Strategies

Strategy Speed Use Case
head-only (default) Fastest Daily scans, slow/network storage
head-tail Fast Better collision resistance
full Slow Bit-perfect deduplication
none Instant Tag-only scanning

Configuration

Create config.yaml in your platform config directory (e.g. ~/.config/soundaudit/config.yaml on Linux, ~/Library/Application Support/soundaudit/config.yaml on macOS, %APPDATA%\soundaudit\config.yaml on Windows) or pass --config:

scan:
  paths:
    - ~/Music
  extensions: [".flac", ".mp3", ".m4a"]
  workers: 4
  hash_strategy: head-only

fingerprinting:
  enabled: false
  fpcalc_path: /usr/bin/fpcalc
  api_key: "your-acoustid-key"

resolvers:
  rate_limit: 1.0
  retry_count: 3
soundaudit scan --config config.yaml
soundaudit tui --config config.yaml

Default database and logs are stored in platform-standard directories (e.g. ~/.local/share/soundaudit/ on Linux).

Performance

  • Slow storage (network-attached, USB): Use --hash-strategy head-only. Full-file hashing over high-latency storage is dramatically slower.
  • Incremental scans: Unchanged files are skipped by mtime — subsequent scans are near-instant.
  • Parallel extraction: Uses ThreadPoolExecutor; overhead is hidden by I/O latency on slow storage.

License

MIT

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

soundaudit-0.1.1.tar.gz (169.7 kB view details)

Uploaded Source

Built Distribution

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

soundaudit-0.1.1-py3-none-any.whl (69.5 kB view details)

Uploaded Python 3

File details

Details for the file soundaudit-0.1.1.tar.gz.

File metadata

  • Download URL: soundaudit-0.1.1.tar.gz
  • Upload date:
  • Size: 169.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for soundaudit-0.1.1.tar.gz
Algorithm Hash digest
SHA256 eb46b48a1abc6d9b787c4749c19f4e3d35af4f435c56c4d77ccea5773990392e
MD5 9e70cc165498e3b199d157ba53631d91
BLAKE2b-256 732f82d487ac5fd1fe9e6ccc629d43642945e6f102ffeb90e3dc0b2b661cc462

See more details on using hashes here.

Provenance

The following attestation bundles were made for soundaudit-0.1.1.tar.gz:

Publisher: publish.yml on nnunodev/soundaudit

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

File details

Details for the file soundaudit-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: soundaudit-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 69.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for soundaudit-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d40a90ceb3160657f86d67553c83001a428daef6d227579d58b684446217d943
MD5 ccda284eb07aa8ff62d9f2482cf40b80
BLAKE2b-256 a8daf0e42d5acca505037f9ed51bcce20991fdd766c309a649878fdadc298747

See more details on using hashes here.

Provenance

The following attestation bundles were made for soundaudit-0.1.1-py3-none-any.whl:

Publisher: publish.yml on nnunodev/soundaudit

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