python3 demo.py, run on 2026-11-18,
plus the PNG plots it generated. Nothing here is simulated or invented.How it works
Audio is chopped into ~93 ms windows and Fourier-transformed into a spectrogram.
The brightest dots — local maxima — become a constellation of a few hundred peaks per song.
Each peak is paired with the next few peaks to make hashes of
(anchor frequency, target frequency, time between them).
A 5-second clip cut from anywhere in a track produces the same hashes, so lookup is a
hash-table search plus a vote: every matching hash votes for (track, offset),
and a real match is the one track whose hashes all agree on a single offset.
A match needs ≥ 5 hashes at one offset and at least 2× the runner-up's score — otherwise
an honest "no match".
Try it yourself: pip install -r requirements.txt && python scripts/generate_library.py && python -m echoprint identify demo_clips/clean.wav — full instructions in the
GitHub repo.
The 10-track library
All tracks are synthesized with NumPy — no copyrighted audio anywhere. Each one is a distinct genre profile, so the matcher is genuinely tested.
| # | Track | Genre | BPM |
|---|---|---|---|
| 01 | Neon Freeway | fast electronic | 132 |
| 02 | Porch Light | acoustic pluck + vocal | 96 |
| 03 | Empty Rooms | piano solo | 80 |
| 04 | Low End Theory Club | bass-heavy hip-hop | 88 |
| 05 | Garage Door | rock drums + distorted guitar | 140 |
| 06 | Confetti Sky | bright pop synth | 118 |
| 07 | Slow Goodbye | slow ballad, long notes | 62 |
| 08 | Monsoon Raag | Bollywood (Bhairavi) scale | 100 |
| 09 | Rainy Window | lo-fi mellow | 72 |
| 10 | Crown of Strings | orchestral, many voices | 110 |
Step 1 — Fingerprint the library
[1/6] Fingerprinting the 10-track library... 10 tracks, 5629 unique hashes, 7180 entries -> /home/hatch/workspace/overnight-6-apps/echoprint/echoprint.db.json
Steps 2–5 — Identify four clips
[2-5/6] Identifying clips... clean 5s clip (from the middle of track 03): --- clean.wav --- MATCH: 03-empty-rooms (id: 03-empty-rooms) clip hashes: 169 shared with library: 97 aligned score: 73 hashes at one offset offset in track: 3.00 s runner-up: 09-rainy-window (2) confidence: 43.2% why: 73 hashes agree on offset 3.00 s same clip + white noise: --- noisy.wav --- MATCH: 03-empty-rooms (id: 03-empty-rooms) clip hashes: 176 shared with library: 89 aligned score: 56 hashes at one offset offset in track: 3.00 s runner-up: 07-slow-goodbye (1) confidence: 31.8% why: 56 hashes agree on offset 3.00 s same clip at 1.3x speed — expect NO MATCH: --- sped-up.wav --- NO MATCH — no track in the library fits this clip clip hashes: 156 shared with library: 0 aligned score: 0 hashes at one offset offset in track: 0.00 s runner-up: - (0) confidence: 0.0% why: no hashes shared with any track in the library a melody from no track — expect NO MATCH: --- unknown.wav --- NO MATCH — no track in the library fits this clip (closest was 07-slow-goodbye with aligned score 1) clip hashes: 119 shared with library: 1 aligned score: 1 hashes at one offset offset in track: 2.58 s runner-up: 09-rainy-window (1) confidence: 0.8% why: best aligned score 1 is below the threshold 5 — too few hashes lined up
Step 6 — Show the work: track 03, spectrogram + constellation (ASCII)
[6/6] Showing the work — track 03, spectrogram + constellation:
== 03-empty-rooms.wav ==
duration 12.0 s | 101 peaks (8.4/s) | 249 unique hashes
freq ^ (0-11025 Hz, time ->)
. . . . .
. . :. . . . :. ::. -. . . . . .
:. ::. :. .:. :.... :. ::. ... -. ::..:. . .:. :...:.
+-:++==#+=*+==*=-*+==-:.+=-++=-#+=**=-%+=**=-#=-++==*=-=-::=-:*+=+*=-:..
+-:=+--*=-+=--*=-*+-+@#+#*==+=-*=-=+--+=-++--*=-==--*=-%%*+#+=++-=+-::..
constellation: * = peak (freq ^, time ->)
*
* * * * * *
* * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * ** * * * * *
================================================================The same track, as plots
Generated by echoprint show tracks/03-empty-rooms.wav --plots plots/ during the same run.


Demo verdict — 5/5 PASS
Demo verdict: clean clip matched track 03: PASS noisy clip still matched: PASS noisy score < clean score: PASS sped-up clip honestly no match: PASS unknown audio honestly no match: PASS ================================================================
Honest limits
Tempo/pitch changes break it — a clip sped up 1.3× moves every peak, so no hashes line up (the demo proves this on purpose). The library is 10 synthesized tracks, not a music catalogue. Noise lowers the score, and clips under ~2 s don't have enough hashes to clear the threshold. Tempo-invariant matching is a documented v2 idea.
github.com/iamkorvynn/echoprint — MIT, clean-room from the published Wang (2003) method. No Shazam code, branding, or audio was used.