Skip to main content

clapback

Search your own music by description, and find duplicates across formats and masters.

pip install clapback-cli

clapback index ~/Music
clapback search "dreamy ambient with piano"
clapback duplicates

What it does

Search by description. CLAP puts audio and text in one space, so "something slow with brushed drums" is a query rather than a keyword match against filenames you may never have typed.

Find near-duplicates. Two rips of one recording measure 0.9972–0.9995 under this pipeline; genuinely different music sits far below. That gap is what makes duplicate detection across formats and masters work — a FLAC and a V0 of the same master are obvious, and so is the same recording on two different releases.

Both run against your own files, offline. There is no account, no key, and nothing is sent anywhere.

Contribute, if you want to. Opt-in and off unless you type it:

clapback contribute --dry-run   # say what would be sent, send nothing
clapback contribute

This sends the vectors — never your audio, never filenames, never your library's contents. A recording is identified by the SHA256 of its AcoustID fingerprint, which is one-way: the corpus learns that somebody has a recording without learning which recording it is. Everything sent is dedicated to the public domain under CC0 1.0, like every other row in the corpus, and may be republished in its public exports.

Every track is looked up before it is offered, so re-running contributes only what is new. That is not politeness about bandwidth — a repeat submission is recorded as agreement, and one install agreeing with itself would corrupt the one measurement the commons exists to make.

Contributing needs chromaprint, and only contributing does:

brew install chromaprint     # or: apt install libchromaprint-tools
pip install pyacoustid

Without it, indexing, search and duplicates work exactly as well.

Why clapback-cli and not clapback

The bare name on PyPI belongs to an unrelated package from 2018 that adds clap emojis to sentences. The distribution is therefore clapback-cli, matching clapback-embed; the command you type is still clapback.

What it needs

clapback-embed, which arrives with it, and the ONNX encoders it runs on. Those are 614 MB and not bundled — a package that downloaded them on install would be lying about its size. Export them once:

pip install 'clapback-embed[export]'
python -m clapback_embed.scripts.export_models --out ~/.cache/clapback/models

Or point CLAPBACK_MODEL_DIR at them if you already have them.

Where things are kept

~/.clapback/ — a vectors.npy and an index.json, both yours. Deleting the directory loses nothing but the time to rebuild it.

If you contribute, index.json also holds a client_id: a random UUID minted the first time you contribute and never before, derived from nothing about you or your machine. It exists so the corpus can tell two contributions apart from one client retrying. Delete it and you are a new contributor; nothing else changes.

What it is not

Not a player, not a tagger, not a library manager, not a downloader. It does the two things a CLAP embedding makes uniquely easy and stops.

Why it exists

It is the reference client — the place the commons's contract is exercised end to end — and not the way most people are expected to arrive. The argument for it is in ADR-0009: a donation client with no local value has no first contributor, and this project has measured proof that passive accumulation does not happen. What the tool does locally is the draw; contributing to the commons is a byproduct of it.

The route to the commons for most people is the tool they already run. ADR-0011 says so: if you use beets, beets-clapback does everything above against your library and can name what it contributes with mb_trackid. If you are writing a tool, the contract this CLI follows is published on its own as clapback-client — no dependency beyond the standard library, so a tool with its own embedder can take part without ONNX Runtime. This CLI is built on it, which is what keeps the reference client and the published contract from drifting apart.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clapback_cli-0.1.2.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

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

clapback_cli-0.1.2-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file clapback_cli-0.1.2.tar.gz.

File metadata

  • Download URL: clapback_cli-0.1.2.tar.gz
  • Upload date:
  • Size: 14.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for clapback_cli-0.1.2.tar.gz
Algorithm Hash digest
SHA256 3579592a3fd99a12745b0181c701baeb575694693722f19ed6ed94555ad8bbc5
MD5 440b353b2ccbbcbd5cbfdde6200790f0
BLAKE2b-256 a133f8cf151deca50b55f512aa4e19386ccc2f0d39b4f2bfca2a9ef6205d8739

See more details on using hashes here.

Provenance

The following attestation bundles were made for clapback_cli-0.1.2.tar.gz:

Publisher: cli-release.yml on seethroughlab/clapback

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

File details

Details for the file clapback_cli-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: clapback_cli-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for clapback_cli-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 750b76b04345cddfb80a152a980b186dd7fb6567ef96b7f21983556a3777a503
MD5 f22f62b04ccbb248e0f2b011b46a3935
BLAKE2b-256 cc7634524339bec95dd57b8f91ec475096bb569688a8e510b283965d80f80ed6

See more details on using hashes here.

Provenance

The following attestation bundles were made for clapback_cli-0.1.2-py3-none-any.whl:

Publisher: cli-release.yml on seethroughlab/clapback

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

Release history Release notifications | RSS feed

0.2.0

2 files

This release

0.1.2 This release

2 files

0.1.1

2 files

0.1.0

2 files

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