Skip to main content

beets-clapback

Look up, embed, and — if you say so — contribute CLAP embeddings for your beets library to the clapback commons. absubmit reborn, with a payload that can actually be reconciled across contributors.

pip install beets-clapback
plugins: chroma clapback

clapback:
  contribute: no      # opt-in. Turn it on when you have read "what leaves the machine";
                      # what you send is CC0.
beet clapback                        # every track: look up, else embed; contribute if enabled
beet clapback artist:Autechre        # any beets query
beet clapback -p                     # say what would happen, touch nothing
beet clapback-search "dreamy ambient with piano"
beet clapback-similar title:"Gantz Graf"    # what sounds like this — including music you don't own

What it does

For each track: hash the AcoustID fingerprint the chroma plugin already stored (or compute one), ask the commons whether it holds an embedding for that recording from the reference pipeline, and if so take it — the model does not run. If not, embed locally with clapback-embed, keep the vector, and contribute it back only when contribute: yes.

The asking is done for the whole library at once, a hundred tracks a request, and a track that carries a MusicBrainz recording id (mb_trackid) or an AcoustID track id (acoustid_id) is asked for by that first: the fingerprint hash differs between fingerprinting paths on about half of CD audio, and the id does not, so a recording the commons holds under somebody else's key is still found. Contributions go out a hundred at a time too, every guarantee per row.

Flexible attributes land on each item, so you can query them like anything else:

field values
clapback_hash the corpus key — SHA256 of the fingerprint
clapback_status found · contributed · local · unfingerprinted · unembedded
clapback_named the MusicBrainz recording id this install has told the commons about
clapback_named_acoustid the AcoustID track id it has told the commons about, when chroma stored one
beet ls clapback_status:local        # embedded here, not yet in the commons
beet ls -a clapback_status:found     # albums the commons already had

The vectors live in clapback/ under your beets config directory, so clapback-search works offline over everything embedded or fetched. Delete that directory and nothing is lost but time.

What sounds like this

beet clapback-similar <query> takes the first matching track and asks the commons what sounds like it — across every library it holds, not just yours:

sounds like: Plaid - Zala
0.9731  Autechre - Gantz Graf  (in your library)
0.9560  https://musicbrainz.org/recording/1c6da765-…  (1 claim)
0.9246  6071d294e2b8a0f1…  (not yet named by anyone)

A neighbour you own is your track. One you don't is a MusicBrainz recording you can open, when anyone has told the commons what it is. One nobody has named yet is still a hash — shown as one, rather than hidden. The more people contribute with mb_trackid, the fewer of those there are.

What it needs

  • chroma enabled, or chromaprint installed so this plugin can fingerprint itself. chroma is the better answer — it stores the fingerprint once and every plugin benefits.
  • The ONNX encoders for clapback-embed, 614 MB, not bundled:
    pip install 'clapback-embed[export]'
    python -m clapback_embed.scripts.export_models --out ~/.cache/clapback/models
    
    Without them, lookups still work; embedding does not, and the plugin says so.

What leaves the machine

Nothing until contribute: yes. Then, per track: a 512-float vector and a one-way hash for recordings the commons did not already hold, and — when the track has them — its MusicBrainz recording id (mb_trackid) and its AcoustID track id (acoustid_id), for every track. Never audio, never paths, never other tags. The hash cannot be reversed into the fingerprint, and the fingerprint is not the audio.

The ids are what let the commons tell somebody else what their nearest neighbour is called, and what let it recognise your recording under another install's key. A recording id is a title and an artist one public MusicBrainz call away, so a named row is not anonymous: it tells the commons operator, and anyone reading the public export, which recordings you hold. That is why it goes out under the same switch as the vector and not silently — turning contribute on is the consent for both, and this paragraph is where that is said. 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.

The first contribution mints a random client_id — a UUID, derived from nothing about you or your machine — and stores it at clapback/client_id under your config directory. It lets the commons tell two contributions apart from one client retrying. Delete it and you are a new contributor; nothing else changes.

Options

clapback:
  url: https://clapback.seethroughlab.com
  contribute: no     # send vectors the commons lacks
  auto: no           # run on every import (embedding is minutes per album; off by default)
  pace: 0.15         # seconds between batches of contributions

Why this exists

beets shipped acousticbrainz and absubmit for years. Both were deprecated when AcousticBrainz shut down, and the suggested replacement was to compute locally and keep the results. This is the other half back — with a difference that matters: AcousticBrainz pooled estimates (bpm, key, mood) that could never be reconciled between contributors. An embedding from a pinned pipeline can be. When two people contribute the same recording, the commons can say whether they agree. The reasoning is in ADR-0011.

Metadata

Release files for beets-clapback 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for beets-clapback 0.3.0
File Size Uploaded Provenance Actions
beets_clapback-0.3.0.tar.gz 16.1 kB With provenance Details for beets_clapback-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for beets-clapback 0.3.0
File Interpreter ABI Platform Actions
beets_clapback-0.3.0-py3-none-any.whl Python 3 none any Details for beets_clapback-0.3.0-py3-none-any.whl

Total release size: 28.4 kB

Release files / beets_clapback-0.3.0.tar.gz

Download URL beets_clapback-0.3.0.tar.gz
Size 16.1 kB
Tags Source
SHA-256 checksum
How to use checksums
3269888c1ef3c51dda54b063ea6bf1057c6273de5ca5b7b2b008672bf56fc711
BLAKE2b-256 checksum
How to use checksums
66505a3d3fbcebba9aa06d406db7abc5c6f84adde565a6ed84717b1d245fb368
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.

Transparency log

Release files / beets_clapback-0.3.0-py3-none-any.whl

Download URL beets_clapback-0.3.0-py3-none-any.whl
Size 12.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9fc13315921e4c2c2f96743ad48320c0f58f1c065f9865410a080363514778d4
BLAKE2b-256 checksum
How to use checksums
e207799b66efcddec1b2e2e247e673c03b65bd46786f6962b1c4efa396ed0cdf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.

Transparency log

Security for beets-clapback 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for beets_clapback-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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