Implementing a sound identifier in Python

Cameron MacLeod

@notexactlyawe

notexactlyawe/abracadabra

Music Information Retrieval

Why Python?

Awesome Demo That Totally Works

Theory prerequisites

Signals

Fourier Transforms

Structure

Fingerprinter

Normaliser

Storage

Normaliser

Audio

Identifier

MP3

AAC

Ogg

Fingerprinter

Goals

  • Smaller storage
  • Speed of search
  • Robustness in presence of noise
  • Matching with short recordings

Fingerprinter

Audio

Chunk into n ms segments

Convert to freq domain

Chunk windows

Find max n points per chunk

Pair points

Hash

Unicorns

Frequency

Audio

Chunk into n ms segments

Convert to freq domain

Frequency

Audio

Chunk into n ms segments

Convert to freq domain

Maxima

Chunk windows

Find max n points per chunk

FFTed

Maxima

Chunk windows

Find max n points per chunk

FFTed

10 7 8 4 7 12 7 3 2 1
9 6 5 4 3 4 5 8 9 10
5 3 3 3 2 4 5 4 4 4
3 5 7 9 11 13 9 5 3 1
7 6 7 6 8 8 6 5 4 3

Hashing

Pair points

Hash

Unicorns

Hashing

Pair points

Hash

Unicorns

f1:f2:dt

t1:id

Storage

Pair points

Hash

Unicorns

f1 - 12b

f2 - 12b

dt - 10b

t1 - 22b

56b total

But what if I just want something that works?

worldveil/dejavu

Will Drevo

One final take-away

Any questions?

@notexactlyawe

notexactlyawe/abracadabra

abracadabra EuroPython 2016 (English)

By Cameron Macleod

abracadabra EuroPython 2016 (English)

Slides for a talk on abracadabra given at EuroPython 2016 in Bilbao. https://github.com/notexactlyawe/abracadabra

  • 1,463