Tuesday, April 05, 2005

Shazam@home

Anyone who has been using the music tagging service by Shazam might have wondered how on earth their computers are able to recognize audio that fast and under such extremely noisy conditions. The solution, as I found out after a quite short internet search, is a pretty smart algorithm developed by Dr. Avery Wang. Thanks to the hints he gave in a presentation at the ISMIR2003 conference, I was able to program the whole thing in Matlab in one evening.

First I did a test with a few songs on my pc. After the program trains itself with the songs, it takes a 5-second fragment of one of the songs, highly degrades it with noise and then tries to recognize it. It turned out to work just fine, and above all, very fast. Then I went for the heavier version, and fed 1000 different audio tracks into the training part of the program. To my surprise, it continued to recognize the music perfectly, in much cases up to noise degradation levels at which the human ear isn't capable anymore of recognizing it, which was nice.

That being written, if you want to get the Matlab code to play around a bit at home with, just contact me [updated 2016-03-21] check the GitHub repo.

6 comments:

Anonymous said...

bjr Steven
je suis eleve ingenieur au maroc mon stage de fin d'etudes s inspire de l 'algorithme de shazam,j en serai reconnaissant si vous m envoyer le code source matlab que vous avez developpe..merci
vous pouvez me l envoyer sur mon adresse mail maadani888@yahoo.fr

Anonymous said...

hi steven
i m student telecom engineering i m pleased if u send me the matlab code source of music recognition to my mailbox maadani888@yahoo.fr

Anonymous said...

Hi Steven sir,

I am a communication student and working on my DSP project (i.e shazam) I will be very pleased if you send me Matlab code of Shazam I have been working on it since 2 months I am not able to find the correct match.

gmail id- vkamesh70@gmail.com
v.kamesh.14ece@bml.edu.in

please help me with this problem

Steven Van Vaerenbergh said...

You can download it here: https://github.com/steven2358/Shazam-Matlab

Unknown said...

Hi Steven,
I have downloaded your code and try to run it, but it seems that there is no way to put my test segments into the code. Can you tell me where to put the test segment so that the code a=can do the test? besides, you said this package requires a directory containing music. Does it mean I need to put a dozen songs of .mav format into the 'songdir' file?
thanks

Gurwinder80 said...

Hi Steven
I need project like this for my master degree project. Can I use your code for my project?
I shall be very thankful to you .
Regards,
Gurwinder