Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Song Matching and IDing by Analyzing and Hashin...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Milos Miljkovic
November 11, 2015
Science
0
140
Song Matching and IDing by Analyzing and Hashing Audio Fingerprints
Slides from the talk given at PyData NYC2015.
Milos Miljkovic
November 11, 2015
Tweet
Share
Other Decks in Science
See All in Science
Optimization of the Tournament Format for the Nationwide High School Kyudo Competition in Japan
konakalab
0
150
KH Coderチュートリアル(スライド版)
koichih
1
58k
Celebrate UTIG: Staff and Student Awards 2025
utig
0
790
DMMにおけるABテスト検証設計の工夫
xc6da
1
1.5k
良書紹介04_生命科学の実験デザイン
bunnchinn3
0
120
2025-05-31-pycon_italia
sofievl
0
140
データベース08: 実体関連モデルとは?
trycycle
PRO
0
1k
コンピュータビジョンによるロボットの視覚と判断:宇宙空間での適応と課題
hf149
1
530
HajimetenoLT vol.17
hashimoto_kei
1
170
Agent開発フレームワークのOverviewとW&B Weaveとのインテグレーション
siyoo
0
420
デジタルアーカイブの教育利用促進を目指したメタデータLOD基盤に関する研究 / Research on a Metadata LOD Platform for Promoting Educational Uses of Digital Archives
masao
0
150
Navigating Weather and Climate Data
rabernat
0
110
Featured
See All Featured
Into the Great Unknown - MozCon
thekraken
40
2.3k
Facilitating Awesome Meetings
lara
57
6.8k
Statistics for Hackers
jakevdp
799
230k
Music & Morning Musume
bryan
47
7.1k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.7k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
300
How to build a perfect <img>
jonoalderson
1
4.9k
sira's awesome portfolio website redesign presentation
elsirapls
0
150
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
220
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
190
Transcript
Song Matching & IDing *** Analyzing and Hashing Audio With
Python Scientific Stack And SQL DB
Link to talk material bit.ly/MMNYC15 GitHub
Talk outline • Airing of grievances • Feats of strength
• Pontification
Who is this guy? Miloš Miljković @miishke
WW WW
Data science mule Slow, not too smart, and hard working
under burden.
?
SOTU 2015
SOTU 2015 – applause occurrence time [min] and duration [s]
SOTU 2015 – speech and applause duration [s]
Somebody said something on Twitter
Literature search
Who is doing it?
Why do it?
o utlier
Step one
Steps 2 to N
Awesome paper • Andrew Wang • An Industrial-strength Audio Search
Algorithm • Clearly written, informative figures • Seven (7) pages long
None
Sound & human hearing • 20 – 20,000 Hz •
Loudness in dB (logarithmic scale) • Quiet study room ~40 dB • Jackhammer ~95 dB • Jet engine ~140 dB
Human auditory system
Recording & encoding • ADC → pulse-code modulation • 16
bit signed integer • Shannon – Nyquist theorem • 20 kHz → 40 kHz • CD audio 44.1 kHz
Audio bit rate • sampling rate x bit depth x
n • 44,100 x 16 x 2 = 1,411 kb/s • MP3 highest quality is 320 kb/s
Short time Fourier transform STFT
bit.ly/FTSEA15 William Cox @gallamine
STFT • Analysis of frequencies in signal when frequency varies
in time • Speech, music, seismology, ECG…
STFT in a nutshell • Apply DFT to windowed segments
of data • Windows overlap • Windows are apodized
STFT Q&A • How long are window segments? • Why
do windows overlap? • Why do we mess with windows? • What is apodization?
Jupyter notebook time!
Peak quadrants
Churning out numbers • Make quadrant for each peak •
In each quadrant for each peak pair record f 1 , f 2 , Δt • Pass [f 1 , f 2 , Δt] through hash function
Beaty of simplicity
Align and match • For each peak record offset time
and its hashes • Find matching hashes and get song IDs • d = offset song - offset recording
None
SQL DB CREATE TABLE fingerprint( hash songID offset ); CREATE
TABLE song( songID song_name );
Power of Python • scipy → read in raw audio
• matplotlib → spectrogram • scikit-image → find peaks • Python → hash • Python → set intersection
Performance • DB size • Search time • No messing
with play speed • False positives or are they?