← Back to blog

Chromaprint: Spectral Fingerprinting for Duplicate Audio Detection

Sakarto's Chromaprint-inspired algorithm finds duplicate and similar audio files using spectral fingerprinting—perfect for re-encoded tracks, different bitrates, and near-identical audio. Free, browser‑based, and 100% private.

Sakarto Chromaprint audio duplicate finder interface showing spectral fingerprint groups and audio players

Finding duplicate audio files is trickier than finding duplicate images. Two copies of the same song at different bitrates—a 320 kbps MP3 and a 128 kbps MP3—share almost no bytes at the bit level. A lossless FLAC and a re-encoded MP3 are structurally unrelated. Byte-for-byte matching will miss every single one of them.

That’s where spectral fingerprinting comes in. Instead of comparing bytes, it compares the actual sound content: the frequency spectrum, the loudness of different bands, the overall shape of the audio. Chromaprint is Sakarto’s pure‑JavaScript implementation of this idea—inspired by the system used by MusicBrainz and AcoustID, but running entirely in your browser with zero dependencies, zero CDN requests, and full offline capability.

For re-encoded tracks, different bitrates, and near-identical audio, Chromaprint is the algorithm that finds the duplicates the others miss.


What makes Chromaprint different from other audio algorithms?

Sakarto gives you three audio algorithms for a reason. Each one measures a different property of sound:

AlgorithmWhat it measuresBest forThreshold direction
ChromaprintSpectral energy shape (frequency bands)Re-encoded tracks, different bitrates, format conversionsLower = stricter
Essentia HPCPHarmonic pitch class content (musical notes)Cover versions, live recordings, harmonic similarityHigher = stricter (inverted)
Meyda MFCCTimbral texture (spectral envelope)Speech, podcasts, voice memos, sound effectsLower = stricter

The key insight: Chromaprint captures the overall “shape” of sound—which frequency bands are louder than others at each moment. This is stable across bitrate changes, codec differences, and minor level adjustments. A 320 kbps MP3 and a 128 kbps re‑encode have different absolute frequency values, but the relative ordering of bands—which bands are louder than their neighbours—stays almost identical.


How the algorithm works: a deep dive

Let’s walk through exactly what happens when you scan a folder with Chromaprint.

Step 1: Decode and resample to 11,025 Hz

The browser decodes the audio file at its native sample rate using AudioContext.decodeAudioData(). An OfflineAudioContext then resamples to a fixed 11,025 Hz mono signal. All files are normalised to the same rate before any analysis, so MP3, WAV, FLAC, and OGG are directly comparable regardless of their original sample rates.

Step 2: Apply a Hann window and split into frames

The mono audio stream is divided into overlapping frames of 4,096 samples each, stepping forward 1,024 samples (hop size) per frame. Before analysis, each frame is multiplied by a Hann window function—a smooth bell curve that eliminates edge artifacts at frame boundaries and improves frequency resolution.

Each second of audio produces roughly 10 frames (at 11,025 Hz with a 1,024-hop step), so a 3‑minute song produces around 1,800 sub-fingerprints.

Step 3: Compute the frequency spectrum (FFT)

A pure‑JavaScript Cooley‑Tukey Fast Fourier Transform converts each windowed frame from the time domain to the frequency domain, producing a magnitude spectrum. Each FFT output bin represents the energy at a specific frequency. The spectrum for a 4,096‑sample frame at 11,025 Hz covers frequencies from 0 Hz up to ~5,512 Hz at ~2.7 Hz resolution per bin—enough to capture the essential spectral content of music and speech.

Step 4: Divide into 16 frequency bands and hash

The magnitude spectrum is divided into 16 equal‑width frequency bands. The total energy in each band is summed. Then 15 adjacent‑band comparisons are made: is band N louder than band N+1? Each comparison sets one bit in a 15‑bit sub‑fingerprint. This is the same core idea as Chromaprint: it captures relative spectral shape, not absolute values, making it robust against loudness normalisation and bitrate changes.

Step 5: Build the full fingerprint

One sub‑fingerprint (15‑bit integer) is produced per frame. The full audio file produces an array of these integers—typically hundreds to thousands depending on file length. This array is the audio “fingerprint” stored in memory for comparison.

Step 6: Compare using Hamming distance

To compare two files, their fingerprint arrays are XOR’d element by element. Each XOR result is popcount’d (number of differing bits counted). The total errors are divided by the total bits compared to produce a distance percentage. If this percentage falls below the threshold set by the slider, the files are grouped as duplicates.

A duration pre‑check rejects pairs where one file is shorter than 50% of the other. This prevents a short clip from matching a full‑length version of the same song simply because the short clip’s fingerprints are a subset.


What Chromaprint finds well

Type of duplicateHow well it worksWhy
The same track at different bitrates (320k vs 128k MP3)✅ ExcellentBitrate changes affect absolute values but not relative band ordering.
Lossless vs. lossy exports of the same master (WAV vs MP3)✅ ExcellentSpectral shape is preserved even when compression discards data.
Re‑encoded copies in different formats (FLAC → OGG → M4A)✅ ExcellentFormat changes affect encoding but not overall spectral shape.
Lightly normalised or level‑adjusted versions✅ Very GoodRelative band ordering is unchanged by level changes.
The same recording with slightly different silence at start/end✅ GoodFingerprint arrays are compared element‑wise, ignoring extra silence.
Duplicate podcasts or spoken‑word recordings✅ GoodSpectral shape of speech is preserved across formats.
Sound effects saved in multiple formats✅ GoodSame principle—spectral shape is format‑agnostic.
Heavily pitch‑shifted versions (more than ~2 semitones)⚠️ May strugglePitch shift moves frequency content to different bands.
Time‑stretched recordings⚠️ May struggleTime stretching changes frame alignment.
Remixes with significant additional instrumentation⚠️ May struggleExtra instruments add frequency content.
Very short clips (under ~15 seconds)⚠️ May struggleLess fingerprint data = less reliable matching.
Cover versions or different performances⚠️ May struggleInstrumentation differences change spectral shape. Use Essentia HPCP instead.

Understanding the Hamming threshold slider

The Hamming Threshold slider (0–50) controls how strictly two fingerprints must match to be grouped as duplicates. It is the most important control on this page.

Threshold rangeWhat it doesWhen to use
0–5 (Very strict)Only nearly identical files match. Very few false positives.Finding exact duplicates and same‑master re‑exports at different bitrates.
6–15 (Balanced)Catches re‑encoded versions, different bitrates, and light post‑processing.Default and recommended. The default of 10 is a good starting point for most music libraries.
16–25 (Loose)Groups files with similar overall spectral character. More false positives.If you’re missing duplicates that are more significantly re‑encoded.
30+ (Very loose)Groups files with broadly similar spectral shape.Only use for exploration. Expect false positives—always listen before deleting.

Important: The slider uses quadratic scaling. The actual comparison threshold is (slider²) / 50:

  • Slider 10 ≈ 2% bit‑error rate
  • Slider 20 ≈ 8% bit‑error rate
  • Slider 30 ≈ 18% bit‑error rate
  • Slider 50 = 50% bit‑error rate

Two identical files produce 0% error. Two completely unrelated audio files average around 50% error. Most re‑encoded duplicates fall below 4–6%.


How to use Chromaprint: step by step

Step 1: Select a folder to scan

Go to the Chromaprint duplicate finder page. Click 📁 Select Folder to Scan or drag and drop a folder onto the page. Supported formats: MP3, WAV, FLAC, OGG, M4A, AAC. Files over 100 MB are skipped. Non‑audio files are silently ignored.

Tip: Audio scanning runs fully in the background—you can switch browser tabs freely. Unlike video scanning, the Web Audio API does not pause when the tab is hidden.

Step 2: Wait for the scan to run

A progress bar shows how many files have been processed. Processing speed depends on file length and your CPU—expect roughly 1–3 seconds per track for typical music files. Duplicate groups appear live as they’re found—you don’t have to wait for the full scan to finish before reviewing results.

Click Stop at any time to halt the scan. Results found so far remain visible.

Step 3: Adjust the Hamming threshold

After scanning, use the Hamming Threshold slider to control matching sensitivity. Moving the slider re‑groups all already‑processed fingerprints instantly—no re‑scanning is needed.

  • Start at the default of 10 (strict—exact and near‑exact duplicates)
  • Move to 15–20 if you want to catch more re‑encoded versions
  • Move below 5 only if you want only genuinely identical files

Step 4: Review the duplicate groups

Results appear in numbered groups. Each group contains audio files that the algorithm considers similar. Use the built‑in players to listen to each file before making decisions.

  • Click a card to select it (blue border)
  • Ctrl+Click (Cmd+Click on Mac) to add to the compare list (purple border)
  • Click the 🔍 icon on hover to open a full‑screen preview with the modal‑size player
  • Right‑click any card for the context menu
  • Click & drag on empty space to box‑select multiple cards

Step 5: Listen and compare

Use the custom audio player on every card:

  • ▶ Play — starts playback, pauses all other tracks on the page
  • Progress bar — click to seek, drag to scrub
  • 🔊 / 🔇 — mute/unmute this individual track
  • Time display — shows current position / total duration

Ctrl+Click two or more cards, then click ⚖️ Compare in the toolbar. A modal opens showing each file with its own modal‑size player, file metadata (duration, size, type, path), and a similarity percentage. For 3+ files, a full pairwise similarity matrix is shown.

Step 6: Take action—Move, Delete, or Copy

Select files and use the toolbar buttons. With Queue Mode on (recommended), files are staged for review first:

  • 📋 Copy — copy filename(s) to clipboard
  • 📂 Move — stage for move to Audio‑Duplicates folder
  • 🗑️ Delete — stage for permanent deletion
  • ⚖️ Compare — view and listen side‑by‑side

Warning: Deletions are permanent. The File System Access API bypasses the recycle bin. Always use Queue Mode to review before executing. There is no undo.

Step 7: Execute queued actions

Queue Mode (enabled by default) stages files instead of acting immediately. Switch to the Move Queue or Delete Queue tab in the sidebar. Review the queued files, listen to them, remove any you change your mind about, then click Move All Files or Delete All Files to execute.

The default destination folder for Move is Audio‑Duplicates, created inside the scanned folder. You can rename it in the queue input field.


When to use Chromaprint vs. the other 2 audio algorithms

Sakarto gives you three audio algorithms for a reason—each one handles a different type of duplication problem. Here’s when to pick Chromaprint over the others:

Essentia HPCP — harmonic content for covers

Essentia HPCP uses Essentia.js WebAssembly to compute a 12‑bin Harmonic Pitch Class Profile at 44,100 Hz. It measures which musical notes are present—not the sound of the instruments. It finds cover versions, live recordings, and alternate arrangements even when the instrumentation is completely different.

Use Chromaprint instead: You have the same recording in different formats or bitrates. Essentia HPCP is for harmonic similarity; Chromaprint is for re‑encoded copies of the same master. Chromaprint is also faster and has no CDN dependency.

Meyda MFCC — timbral texture for speech

Meyda MFCC extracts 13 Mel‑Frequency Cepstral Coefficients—originally developed for speech recognition. It captures timbral texture (the “colour” of sound) and only analyses the first 10 seconds of each file. Excellent for podcasts, voice memos, and sound effects.

Use Chromaprint instead: You’re working with music, not speech. Chromaprint’s full‑track spectral analysis is more reliable for music than Meyda’s 10‑second window, and Chromaprint has no external CDN dependency.

Chromaprint — spectral fingerprinting for re‑encoded music

Chromaprint is the general‑purpose workhorse for audio duplicate detection. It handles re‑encoded tracks, different bitrates, format conversions, and near‑identical audio with no external dependencies and no tab‑switching pauses.

Use Chromaprint when: You have the same recording in multiple formats or bitrates. It’s the fastest audio algorithm, works completely offline, and is the best starting point for any music library cleanup.


Algorithm quick reference

AlgorithmBest forWhat it measuresExternal libraryThreshold directionSpeed
ChromaprintRe‑encoded tracks, different bitrates, format conversionsSpectral band energy shapeNone—pure JSLower = stricterFastest
Essentia HPCPCover versions, live recordings, harmonic similarityMusical pitch class contentEssentia.js (CDN)Higher = stricter (inverted)Moderate
Meyda MFCCSpeech, podcasts, voice memos, sound effectsTimbral texture (spectral envelope)Meyda.js (CDN)Lower = stricterFast

Privacy: your files never leave your device

Like every Sakarto tool, the Chromaprint audio duplicate finder runs entirely in your browser:

  • Zero network activity after page load. Audio decoding and fingerprint computation all run locally via the Web Audio API. Open DevTools → Network tab during a scan: zero outbound requests.
  • No accounts, no cookies, no analytics. The only localStorage data saved is your OS detection and Queue Mode preference. No file names, paths, or fingerprints are ever saved or transmitted.
  • Folder access is scoped and session‑only. Permission covers only the folder you selected, lasts only while the tab is open, and can be revoked from browser site settings at any time.
  • Purely static—no backend. Sakarto is HTML, CSS, and JavaScript. There is no server‑side component, database, or API endpoint receiving any data from you.

Frequently asked questions (Chromaprint specific)

“Why is this called ‘Chromaprint-inspired’ instead of the real Chromaprint?”

The official Chromaprint library (used by MusicBrainz and AcoustID) is written in C++ and requires either a native binary or a WebAssembly build to run in a browser. This implementation is a pure‑JavaScript port of the core ideas—Hann windowing, Cooley‑Tukey FFT, 16‑band spectral hashing, and Hamming distance comparison. The fingerprints it produces differ from official Chromaprint output and cannot be submitted to AcoustID, but the algorithmic approach is the same and works well for local duplicate detection. The practical advantage over using real Chromaprint WASM is zero dependencies, zero CDN requests, and full offline capability.

”The same song in MP3 and FLAC isn’t being grouped. Why?”

MP3 compression modifies frequency content, so the spectral fingerprint of a FLAC and an MP3 from the same master will differ slightly even though they sound identical to the ear. Try raising the Hamming Threshold to 12–15—this range reliably catches lossless vs. lossy pairs in most cases. Also check that both files have similar duration: the duration pre‑check silently excludes pairs where one file is less than 50% the length of the other, which catches truncated or partial copies. Very heavily compressed MP3s (below 96 kbps) may differ enough that even a raised threshold won’t match them against a lossless source.

”How does the Hamming Threshold slider actually work? What do the numbers mean?”

The slider uses quadratic scaling—the raw slider value is squared and divided by 50 to get a bit‑error percentage. So slider 10 ≈ 2% bit‑error rate, slider 20 ≈ 8%, slider 30 ≈ 18%, and slider 50 = 50%. Quadratic scaling means moving from 0 to 10 has a much bigger effect than moving from 40 to 50, making it easier to fine‑tune at strict thresholds where most of the meaningful differences lie. Two identical files produce 0% error. Two completely unrelated audio files average around 50% error. Most re‑encoded duplicates fall below 4–6%.

”Two different songs are being grouped together. How do I fix it?”

Lower the Hamming Threshold slider. Songs with similar overall spectral character—for example two acoustic guitar tracks with similar strumming patterns, or two bass‑heavy electronic tracks—can produce fingerprints close enough to match at higher thresholds. Drop the slider to 5–8 if you’re seeing unwanted matches. Always use the built‑in player to listen to both tracks before acting on any group. If you’re unsure, Move rather than Delete—the files land in a subfolder you can review and undo manually.

”Why is scanning slow for some files?”

Processing time scales directly with file length: each second of audio produces roughly 10 FFT frames, so a 60‑minute podcast can take 10–20 seconds on a mid‑range laptop. FLAC files also require decoding before the FFT runs, adding a few extra seconds per file. Scanning runs fully in the background via the Web Audio API (it doesn’t pause when you switch tabs), so you can browse other pages while it runs. Closing other browser tabs frees up CPU and noticeably speeds up large scans.

”Can Chromaprint find cover versions or remixes?”

To a limited degree at higher thresholds, yes—particularly when the cover uses similar instrumentation and tempo to the original. But Chromaprint compares spectral energy shape, not which notes are played, so it’s not designed for harmonic similarity. A cover performed on piano instead of guitar will have a very different spectral fingerprint even if it’s the same melody. For reliable cover and alternate‑version detection, use Essentia HPCP instead—its Harmonic Pitch Class Profiles are instrument‑agnostic and specifically designed for this use case.

”Re-clustering with the slider feels slow for my library. Is that normal?”

Re‑clustering runs in a background Web Worker and compares every fingerprint in memory against every other, so it scales with the square of file count. For a folder of 500 files that’s 125,000 comparisons—very fast. For 5,000 files it’s 12.5 million, which can take a few seconds even in a Worker. A progress indicator shows how far along it is. If re‑clustering consistently takes more than 15 seconds, consider scanning by genre or artist subfolder rather than your entire library at once.

”What formats are supported, and why are some files silently skipped?”

Any format your browser can natively decode: MP3, WAV, FLAC, OGG, M4A, AAC. Files over 100 MB are skipped to avoid browser memory issues on larger devices. Formats the browser can’t decode—WMA, APE, AIFF on older browsers, Opus in some configurations—are silently ignored. Files are identified by both MIME type and file extension, so an MP3 with a generic extension will still be processed as long as the browser can decode it.

”Does this work on Firefox or Safari?”

Scanning, fingerprint generation, the built‑in player, result display, and the Compare modal all work in Firefox and Safari. The one thing that doesn’t work is Move and Delete—those rely on the File System Access API, which is only available in Chrome 86+ and Edge 86+. In other browsers you can scan, listen, compare, and use Download List to export a report, then handle the files manually in your OS file manager.


Final thoughts

Chromaprint is the workhorse of Sakarto’s audio duplicate toolkit. It’s not the algorithm to use for finding cover versions—that’s what Essentia HPCP is for. It’s not the algorithm for matching speakers by voice—that’s what Meyda MFCC is for. But for re‑encoded tracks, different bitrates, format conversions, and near‑identical audio, Chromaprint is the fastest, most reliable, and most private option available.

It’s particularly effective for:

  • Music libraries with mixed formats. FLAC, MP3, M4A, OGG—Chromaprint finds copies regardless of format.
  • Re‑encoded collections. The same songs saved at different bitrates over the years.
  • Podcast archives. The same episode saved in different formats or from different sources.
  • Sound effects libraries. The same effect saved at different quality settings.

Where Chromaprint falls short—covers, live recordings, and speech matching—other Sakarto algorithms fill the gap. Use Essentia HPCP for harmonic similarity and Meyda MFCC for timbral texture and spoken word.

But for the vast majority of audio libraries, Chromaprint is the best starting point. It’s fast, it’s private, and it finds the duplicates the others miss.

Ready to find duplicate audio files with Chromaprint?

March 18, 2026
⏱ 18 min read
🇬🇧 English