🎵 EchoPrint

Shazam from scratch, in Python. Hear a 5-second clip, name the track.

Wang (2003) constellation-map fingerprinting NumPy / SciPy, from scratch 10-track synthesized library Demo: 5/5 verdicts PASS
This page is a recorded run of the real tool. EchoPrint is a command-line app — it runs in a terminal, not in a browser. Everything below is the verbatim output of 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.

#TrackGenreBPM
01Neon Freewayfast electronic132
02Porch Lightacoustic pluck + vocal96
03Empty Roomspiano solo80
04Low End Theory Clubbass-heavy hip-hop88
05Garage Doorrock drums + distorted guitar140
06Confetti Skybright pop synth118
07Slow Goodbyeslow ballad, long notes62
08Monsoon RaagBollywood (Bhairavi) scale100
09Rainy Windowlo-fi mellow72
10Crown of Stringsorchestral, many voices110

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.

Spectrogram — 03-empty-roomsSpectrogram of track 03 Empty Rooms
Constellation — 03-empty-roomsConstellation of peaks for track 03 Empty Rooms

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.