{"schema_version":"1","site":"https://decosa.ai","id":"sample-clearance","num":"38","name":"Sample and lyric clearance pre-check","tool_name":"Pre-check samples and lyrics","short":"Sample clearance","blurb":"Checks a track before release against your own catalog: samples (even pitched, stretched, filtered or looped), re-played melodies and lifted lyric lines, each with its time in the track and in the reference. It compares what it finds with what the artist declared and marks each item clear, replace or remove, with a signed record. Triage for clearance staff, not legal advice.","status":"live","labels":{"industry":["music","legal"],"job":["review","attest"],"input":["files","text"],"deploy":["hosted","selfhost"],"status":"live","output":["data","record"],"data":["confidential"],"hardware":"gpu-96","licence":"permissive"},"industries":["music","legal"],"runs_in":["hosted","selfhost"],"part_of":["studio-checks"],"built_from":["typed-judgment","signed-record"],"models":"Audio matching in code (no model); Qwen3.8-27B labels near-duplicate lyric lines","where":"Self-host with your own catalog; the hosted demo uses a CC BY demo catalog","hardware":"Any CPU for the audio matching and lyric spans; Qwen3.8-27B (1× RTX 5090 32 GB or larger) for the lyric labels","final_artifact":"A clearance checklist (CSV or Markdown) with timestamps, confidence, declared status and clear, replace or remove per item, and a signed record.","self_host_first":false,"verification":{"receipt_coverage":"partial","summary":"Receipt per lyric-label call; signed record of what was checked, against which catalog","manual_qa":{"hosted":{"date":"2026-09-25","result":"pass","p50_ms":6732,"p95_ms":null,"runs":null,"receipts_per_run":1,"cost_per_run_usd":0.000112},"selfhost":{"date":"2026-09-25","result":"pass","method":"Fresh clone into a clean directory, docker build, the api service with a named volume, embedding files and the demo catalog fetched inside the container, pointed at the running local vLLM (Qwen3.8-27B) over host networking; then torn down.","notes":"Verified on 2026-09-25: the image builds with ffmpeg and the clearance extra, the demo catalog builds in 81 s (download included), the planted sample returns the same five items and the declared-not-found entry as the hosted run in 5.4 s on the direct route (one attested call), the clean sample returns nothing, the signed record verifies and fails when one action is changed, and no lyric or title text reaches the logs. The first attempt found a bug (the demo track list was not in the image), fixed in the branch. The model server's own startup was not re-verified (no new GPU load)."},"known_limits":["Recall is moderate: 57% of planted borrowings on the test split; quiet samples and short loops are missed most.","It only finds what is in the catalog it is given; the hosted demo catalog is 41 references.","The eval mixes are synthetic, from one composer's CC BY music; real productions may behave differently.","Lyric matching is English and needs a lyric set: the demo uses public-domain songs published before 1929."],"nightly_covers":null},"nightly":"https://api.decosa.ai/verify/status"},"eval_summary":{"metrics":[{"name":"Audio plants found, medium and high confidence","value":"62 of 108 (57%)","unit":null,"n":108,"split":"test","note":null},{"name":"Audio precision, medium and high confidence","value":"0.87 (9 false items)","unit":null,"n":null,"split":"test","note":null},{"name":"Audio plants found, high confidence only (precision)","value":"35 of 108 (32%), precision 1.00","unit":null,"n":108,"split":"test","note":null},{"name":"Clean tracks with any flag","value":"3 of 30","unit":null,"n":30,"split":"test","note":null},{"name":"Lyric plants found with the model's labels: exact / near / heavy paraphrase","value":"8/8, 12/12, 1/8","unit":null,"n":28,"split":"test","note":"1 false item; 0 of 15 clean songs flagged."},{"name":"Chromaprint baseline, samples found","value":"4 of 84 (616 chance matches)","unit":null,"n":84,"split":"test","note":null}],"dataset":"Audio: 35 CC BY 4.0 Kevin MacLeod reference recordings and 73 host recordings by the same artist, with synthetic plants (mixed slices under pitch, tempo, filter, loop and varispeed transforms, plus re-played melody interpolations) and clean excerpts; dev and test use different hosts and seeds. Lyrics: 156 US public-domain songs (5,435 lines) planted into 60 model-written songs, 30 dev and 30 test.","held_out":true,"caveats":["Samples are mixed synthetically; real productions add compression, reverb and other layers. No real-world recall is claimed.","Thresholds were tuned on dev; the test split was scored twice, before and after an interpolation rule changed on dev (first run: 62 of 108, precision 0.89).","One artist's music throughout; a catalog of many artists may behave differently.","Only references in the catalog can be found; the hosted catalog is a 41-reference demo.","Heavy lyric paraphrases are mostly out of reach; the lyric set is English and pre-1929."],"date":"2026-09-25","doc_url":"https://decosa.ai/metrics/evals/sample-clearance"},"stack":{"summary":"Upload a track, its lyrics and the list of samples the artist declared. Code matches the audio against your own catalog, tolerant of pitch shifts to about two semitones, tempo changes to about 14%, filtering and loops, and names the reference and the times in both. Melody references catch re-played interpolations. Lyrics are matched word for word and line by line against a lyric set, and an open model labels near-duplicate lines as lifted, re-worded or a stock phrase, one receipted call per batch. The result is a clearance checklist (what, where, how sure, declared or not, and whether to clear, replace or remove) and a signed record of what was checked against which catalog. It is triage for the people who clear samples, not legal advice.","tagline":"Samples, re-played melodies and lifted lyric lines found before release, each with its time in the track, declared or not, and a clear, replace or remove call, in one signed record.","deployment":"hosted-or-self-host","regulatory_note":"Triage, not legal advice; checked 25 Sep 2026. In the US a sample usually needs two licences: the sound recording (the master, 17 U.S.C. 114, usually from the label) and the musical work in it (from its publishers). An interpolation re-records the music, so it needs the composition licence only; the compulsory mechanical licence does not cover changing a song's melody or fundamental character (17 U.S.C. 115(a)(2)), so interpolations are negotiated. Whether a very short sample needs a licence is unsettled: Bridgeport Music v. Dimension Films, 410 F.3d 792 (6th Cir. 2005) held there is no de minimis defence for sampling a sound recording (\"get a license or do not sample\"); VMG Salsoul v. Ciccone, 824 F.3d 871 (9th Cir. 2016) held there is (a 0.23-second horn hit in \"Vogue\"). The Supreme Court has not resolved the split as far as we found, so the checklist never treats a short sample as safe. In the EU, Pelham v Hütter (CJEU C-476/17, 29 Jul 2019) held that even a very short audio fragment is a reproduction unless it is changed so it is unrecognisable to the ear. Public domain in the US: sound recordings published before 1923 since 1 Jan 2022 (Music Modernization Act, 17 U.S.C. 1401), later ones 100 years after publication (recordings from 1925 on 1 Jan 2026); compositions and lyrics published in 1930 or earlier as of 1 Jan 2026 (the demo lyric set stops at 1928). Creative Commons: BY allows sampling with credit; NC forbids a commercial release and ND forbids adaptations. AcoustID (the public Chromaprint service) is free for non-commercial use and paid for commercial use; this product does not call it. Model licences: Apache-2.0 (Qwen3.8-27B, all-MiniLM-L6-v2).","components":[{"id":"matcher","role":"Audio matcher: log-frequency landmarks with pitch and tempo search, peak-by-peak verification, melody shingles for composition references; lyric spans; declared vs detected; the signed record (no model; CPU)","name":"decosa-api clearance module (decosa_api/verticals/clearance)","hf_repo":null,"license":"AGPL-3.0-or-later","params":null,"quant":null,"vram_gb":0,"memory_gb_estimate":null,"engine":"Python 3.12 and numpy; ffmpeg decodes the upload (Chromaprint through ffmpeg is used only as the eval baseline)","receipt_coverage":"partial","in_hosted_demo":null,"tiers":["lite","standard"],"alternative_to":null},{"id":"embed","role":"Lyric-line embeddings: re-worded lines that share few characters with the original","name":"all-MiniLM-L6-v2 (ONNX)","hf_repo":"sentence-transformers/all-MiniLM-L6-v2","license":"Apache-2.0","params":"22.7M","quant":"FP32 ONNX","vram_gb":0,"memory_gb_estimate":null,"engine":"ONNX Runtime 1.30 on CPU (2 threads)","receipt_coverage":"none","in_hosted_demo":null,"tiers":["standard"],"alternative_to":null},{"id":"judge","role":"Model: labels each near-duplicate lyric line lift, variant, stock phrase or different","name":"Qwen3.8-27B (NVFP4)","hf_repo":"nvidia/Qwen3.8-27B-NVFP4","license":"Apache-2.0","params":"27.8B","quant":"NVFP4 (MLP NVFP4, GDN/attention FP8) + FP8 KV cache; MTP head, 3 draft tokens","vram_gb":20,"memory_gb_estimate":null,"engine":"vLLM 0.29.0, temperature 0, thinking off","receipt_coverage":"strong","in_hosted_demo":true,"tiers":["standard"],"alternative_to":null}],"tiers":[{"id":"lite","label":"Lite · code only, any CPU","summary":"Audio matching, exact lyric spans and trigram near-duplicates with no model and no GPU (judge_lyrics: false). Re-worded lyric lines are not labelled; stock phrases are not dismissed by a model.","components":["matcher"],"hardware":"Any CPU","quality_evidence":[{"metric":"Planted samples and melodies found / precision / clean tracks flagged (test split, 108 plants in CC BY music, 30 clean tracks)","value":"62 of 108 (57%) / 0.87 / 3 of 30","source":"decosa-api docs/evals/sample-clearance.md, 2026-09-25 (thresholds set on the dev split; test scored twice, before and after one dev change, both reported)"},{"metric":"High-confidence items only: found / precision / clean tracks flagged","value":"35 of 108 / 1.00 / 0 of 30","source":"decosa-api docs/evals/sample-clearance.md, 2026-09-25"},{"metric":"By transform (test): pitch ±1-2 semitones / tempo ±5-10% / low-pass / high-pass / 2 s loops / interpolations","value":"14 of 24 / 16 of 24 / 5 of 6 / 6 of 6 / 2 of 6 / 12 of 24","source":"decosa-api docs/evals/sample-clearance.md, 2026-09-25"},{"metric":"Lyric lines, code only (test): exact / one or two words changed / heavy paraphrase / clean songs flagged","value":"8 of 8 / 12 of 12 / 0 of 8 / 0 of 15","source":"decosa-api docs/evals/sample-clearance.md, 2026-09-25 (with embeddings; without them, trigrams alone)"}],"latency_note":"measured: seconds per track on a few CPU threads; no model call.","in_hosted_demo":true,"receipt_coverage":"partial","receipt_note":"No model calls, so no receipts; the record is signed by the instance.","hosting":null},{"id":"standard","label":"Standard · adds lyric labels by Qwen3.8-27B (hosted demo)","summary":"Everything in Lite, plus MiniLM embeddings on CPU and the model's lift, variant or stock label for each near-duplicate lyric line, with a receipt per call.","components":["matcher","embed","judge"],"hardware":"Any CPU plus 1x RTX PRO 6000 96 GB (measured) or 1x RTX 5090 32 GB (estimate) for the model","quality_evidence":[{"metric":"Lyric lines with the model's labels (test): exact / one or two words changed / heavy paraphrase / false items / clean songs flagged","value":"8 of 8 / 12 of 12 / 1 of 8 / 1 / 0 of 15","source":"decosa-api docs/evals/sample-clearance.md, 2026-09-25; 12 model calls, 515 generated tokens for 30 songs"},{"metric":"Audio (same matcher as Lite)","value":"62 of 108 found, precision 0.87","source":"decosa-api docs/evals/sample-clearance.md, 2026-09-25"}],"latency_note":"measured on our server through the shared gateway: seconds for the planted demo track with one label call; a fraction of a cent per run at the gateway's list price.","in_hosted_demo":true,"receipt_coverage":"strong","receipt_note":"Hosted: every label call has its own gateway-signed receipt, listed in the signed record.","hosting":null}],"alternates":[],"services":[{"name":"decosa-api","port":8445,"image":"${DECOSA_REGISTRY}/decosa-api:<tag>","purpose":"GET /clearance/info, /clearance/catalog, /clearance/samples; POST /clearance/check (SSE or JSON); GET /clearance/runs/{id}/export?format=csv|md|record. Holds the audio and lyrics in memory for the request and the run for one hour; logs counts only. Needs ffmpeg (in the image) and a catalog folder (DECOSA_CLEARANCE_CATALOG)."},{"name":"vLLM","port":8114,"image":"vllm/vllm-openai@sha256:c2914767605584b6d8f45686b82de173ecc99e781897aa3d0a66dacd72c51ae1","purpose":"Qwen3.8-27B NVFP4 behind our gateway (hosted) or called directly (self-host), for the lyric labels only."}],"tools":[{"name":"Kevin MacLeod recordings (incompetech.com)","url":"https://incompetech.com/music/royalty-free/","license":"CC BY 4.0 (\"Kevin MacLeod (incompetech.com), Licensed under Creative Commons: By Attribution 4.0\")","purpose":"The demo catalog (35 recordings) and the eval's host tracks (73 more); the list with each Wikimedia Commons page is decosa-api docs/evals/sample-clearance/tracks.json."},{"name":"Synthetic melodies (decosa-api scripts/clearance_melody.py)","url":null,"license":"CC0 (ours)","purpose":"Six composition references for the interpolation check, and their re-played plants."},{"name":"English Wikisource, Category:Song lyrics","url":"https://en.wikisource.org/wiki/Category:Song_lyrics","license":"Public domain in the US (songs published before 1929)","purpose":"The lyric reference set: 156 songs, 5,435 lines."},{"name":"FFmpeg","url":"https://ffmpeg.org/","license":"LGPL-2.1 or later (GPL builds with some options); run as a separate program","purpose":"Decodes uploads; its chromaprint muxer (libchromaprint, LGPL-2.1) gives the eval's Chromaprint baseline."},{"name":"scripts/clearance_eval.py and scripts/clearance_lyrics_eval.py","url":null,"license":"Apache-2.0","purpose":"Plant samples, melodies and lyric lines into CC and synthetic material, score recall, precision and false alarms on clean tracks, dev and test splits."},{"name":"POST /record/verify","url":null,"license":"Apache-2.0","purpose":"Checks the signed record and names the first entry that was changed. The console also verifies it in your browser."}],"hardware":[{"tier":"Any CPU (audio matching, lyric spans and embeddings)","fits":true,"notes":"Measured on our server: a 75 s track against the 41-reference demo catalog takes 2-6 s with a few threads while the machine was busy; building the catalog index takes about 10 s for 41 references. The test server held about 1 GB of memory after runs (the embedding model and the lyric set included). The index grows about 25 KB per minute of reference audio (the demo index is 2.8 MB for about 115 minutes)."},{"tier":"1x RTX 5090 32 GB","fits":true,"notes":"For the lyric labels, Qwen3.8-27B NVFP4 needs about 20 GB of weights plus a small KV cache (short prompts). Estimate: same model and prompts as the measured card, not run here on a 5090."},{"tier":"1x RTX PRO 6000 Blackwell 96 GB","fits":true,"notes":"Measured on our server: the eval, the hosted demo and the self-host check ran on this card, shared with other services the whole time."}],"latency":[{"lane":"The planted demo track (75 s audio, 12 lyric lines), hosted gateway route","typical_ms":6700,"source":"measured on our server 2026-09-25: 6.6, 6.7 and 9.9 s over three runs through our gateway under other load (one label call)"},{"lane":"The clean demo track (60 s, 8 lines)","typical_ms":2200,"source":"measured on our server 2026-09-25, one run, no model call needed"},{"lane":"Audio matching alone, per eval track (75 s), 16 tracks at once on a shared 32-core box","typical_ms":25000,"source":"measured on our server 2026-09-25: median over 126 dev tracks while other jobs ran"}],"benchmark":{"title":"How well does it find planted borrowings?","intro":"Slices of 35 CC BY recordings were pitched, stretched, filtered or looped and mixed 3-12 dB under 73 other tracks, melodies were re-played on other instruments, and public-domain lyric lines were copied or re-worded into new songs. Thresholds were set on a dev split; these are the test split.","rows":[{"label":"Samples and melodies found (108 plants)","value":"57% (62)","detail":"precision 0.87; 3 of 30 clean tracks got a medium-confidence flag"},{"label":"High-confidence items","value":"35 found, all correct","detail":"0 of 30 clean tracks flagged"},{"label":"Samples mixed at -3 / -6 / -9 / -12 dB","value":"71% / 57% / 57% / 43%","detail":null},{"label":"Lyric lines: exact / small changes / heavy paraphrase","value":"8/8 · 12/12 · 1/8","detail":"no clean song flagged"},{"label":"Chromaprint alone, same samples","value":"4 of 84","detail":"and 616 chance matches: built for whole recordings"}],"points":[{"heading":"Where it fails","text":"Quiet slices and short loops, where too few of the reference's spectral peaks survive the mix, and pitch-plus-tempo changes that fall between the search grid points. Three of the nine false items on test were tracks from one series by the same composer that may share material."},{"heading":"What this does not show","text":"Synthetic mixes of one composer's CC BY music are not real productions with compression and effects, and the catalog is 41 references. No real-world recall is claimed."}],"source":"decosa-api docs/evals/sample-clearance.md, 2026-09-25"},"notes":["It knows only the catalog you give it. The hosted demo catalog is 35 CC BY recordings and six synthetic melodies; a clean result there says nothing about the rest of recorded music.","Quiet samples are the hard case: mixed 9-12 dB under the track, about half are found; at -3 dB, about seven in ten. Short loops (1-2.5 s) were found about a third of the time.","Chromaprint, the fingerprint behind AcoustID, is built to name whole recordings. In our mixes it found 4 of 84 planted samples and made 616 chance matches, so it is not used to flag anything.","The actions are rules, the same every run: a sample that carries the track (looped, or 4 s or more) is clear; a short incidental one is replace; an interpolation is clear (the composition); a lifted line is clear, a re-worded line replace. Rights decide how to clear: licence (all rights reserved), credit (CC BY) or nothing to license (CC0, public domain). The demo turns on \"treat every reference as all rights reserved\" to show the full path.","Heavy paraphrases of a lyric line are out of reach by design: flagging on meaning alone would flag every love song.","Not included yet: a bulk loader for large catalogs (one folder and one command today), lyric sets in other languages, and a learned audio embedding for short loops (the strong open ones we found, such as MERT, are licensed for non-commercial use only)."]},"buyer_facts":[{"label":"Data retention","value":"The audio and lyrics are held in memory for the request; the run (checklist and record, no audio) for one hour, for the token or key that made it. Nothing is written to disk; logs carry counts only."},{"label":"What leaves the box","value":"Self-hosted: nothing (the lyric labels go to your own model server). Hosted demo: the audio is matched on Decosa's server; only near-duplicate lyric line pairs go to the model through our gateway."},{"label":"Your catalog","value":"A folder of audio files and a catalog.json (title, artist, rights per recording); the index builds on first start. Melody references (a rendering of each composition) enable the interpolation check. Bring your own lyric set, or use the public-domain one."},{"label":"Cost per track","value":"A fraction of a cent in model time at the gateway's list price for the planted demo (one label call); the audio matching is CPU time only."},{"label":"Output","value":"A checklist (CSV or Markdown): each item's kind, reference and rights, times in the track and in the reference, confidence, declared status, and clear, replace or remove with the reason and how to clear it; declared samples not in the catalog; and a signed record."}],"data_handling":{"page":"/data#sample-clearance","self_host":{"level":"confidential","leaves":"nothing","summary":"Runs on your machine; nothing is sent to Decosa or a third party by default."},"hosted":{"level":"operator-processed","demo_only":false,"summary":"TLS to Decosa's server, then decrypted and processed by Decosa's API server, with the open models run by NEAR AI through OpenRouter, with Reka AI as the only fallback under Decosa's account.","gpus":"operator-contracted","third_parties":[],"retention":"The audio and lyrics are held in memory for the request; the run (checklist and record, no audio) for one hour, for the token or key that made it. Nothing is written to disk; logs carry counts only.","used_for_training":false,"encrypted_while_processed":false},"sealed_tier":{"applies":false,"note":"The sealed tier (raw chat only, never use-case pipelines) is paused at launch (/docs/sealed-tier)."},"external_calls":[]},"console":{"href":"/tools/media/sample-clearance","input":"clearance","lanes":[{"id":"checklist","title":"Checklist","kind":"list"},{"id":"declared","title":"Declared vs detected","kind":"list"},{"id":"record","title":"Signed record","kind":"json"}],"samples":[{"n":1,"id":"planted","title":"Planted","deep_link":"/tools/media/sample-clearance?sample=1&autorun=0"},{"n":2,"id":"clean","title":"Clean","deep_link":"/tools/media/sample-clearance?sample=2&autorun=0"}],"deep_link_params":{"sample":"1-based index into samples, or a sample id","autorun":"1 = start the run once the sample is loaded; 0 (default) = only preselect","reduce-motion":"1 = turn off animations"}},"api":{"base":"https://api.decosa.ai","contract":"/api/contract.json","contract_markdown":"/api/contract.md","reference":"/docs/api","keys":"/account/keys"},"prompts":{"hosted":"/prompts/sample-clearance-hosted.md","selfhost":"/prompts/sample-clearance-selfhost.md","assemble":"/prompts/sample-clearance-assemble.md","mac":"/prompts/sample-clearance-mac.md"},"rehearsal":{"bundle":"/samples/sample-clearance.zip","bundle_url":"https://decosa.ai/samples/sample-clearance.zip","folder":"/samples/sample-clearance/","expected":"/samples/sample-clearance/expected.json","files":["/samples/sample-clearance/expected.json","/samples/sample-clearance/inputs/declared.txt","/samples/sample-clearance/inputs/lyrics.lrc","/samples/sample-clearance/inputs/night-walk-planted.opus"],"bytes":664923,"checks":["the undeclared Fork and Spoon slice is flagged","the Fork and Spoon slice is placed near 0:30","the declared Dirt Rhodes loop is found and documented","the lifted 1909 lyric line is flagged","the re-played synthetic melody is flagged as an interpolation","the declared sample that is not in the catalogue is listed","the Markdown export names the flagged sample","the signed record verifies","a record with one entry edited no longer verifies","every model call has a signed receipt"],"licence":"Audio: host \"Hustle\" by Kevin MacLeod (incompetech.com), CC BY 4.0; plants from catalogue tracks (CC BY 4.0) and a synthetic melody (CC0). Lyrics written for this demo; the lifted lines are from songs published in 1909 and 1913 (public domain in the US). Declared list: fictional.","about":"A 75 s demo track (a CC BY host with three planted borrowings), its lyrics with a lifted 1909 line, and a declared-samples list. The check must flag the undeclared slowed slice of \"Fork and Spoon\" near 0:30, find the declared \"Dirt Rhodes\" loop as documented, flag the lifted lyric line, list the declared sample that is not in the catalogue, export a Markdown checklist, and end in a signed record that verifies and fails once edited.","run":{"containers":"docker compose exec api python scripts/rehearse.py sample-clearance","checkout":"python scripts/rehearse.py sample-clearance --bundle sample-clearance.zip --base-url http://127.0.0.1:8445","mac":".venv/bin/python scripts/rehearse.py sample-clearance"},"guidance":"Set up with a coding agent (we recommend Claude Code with Claude Opus 5.5; any capable coding agent works) on mock data only, run the rehearsal until every check passes, then run your own data locally yourself. Never give the agent real data during setup."},"hardware_fit":{"check":"/self-host/hardware?use=sample-clearance","data":"/api/hardware.json","tiers":[{"id":"lite","gpu_gb":0,"basis":null,"unknown":[]},{"id":"standard","gpu_gb":57.6,"basis":"stack","unknown":[]}],"mac":{"fit":"full","memory_gb":32}},"links":{"page":"/tools/media/sample-clearance","json":"/use-cases/sample-clearance.json","metrics":"/metrics/sample-clearance","console":"/tools/media/sample-clearance","console_sample":"/tools/media/sample-clearance?sample=1&autorun=0","stack":"/tools/media/sample-clearance#stack","try_live":"/tools/media/sample-clearance","watch":"/tools/media/sample-clearance","build":"/tools/media/sample-clearance#build","self_host":"/tools/media/sample-clearance#self-host","prompts":{"hosted":"/prompts/sample-clearance-hosted.md","selfhost":"/prompts/sample-clearance-selfhost.md","assemble":"/prompts/sample-clearance-assemble.md","mac":"/prompts/sample-clearance-mac.md"}}}