News for hackers. Stuff that matters.
Re:How Shazam works by mwcampbell on Saturday July 11, 2015 @07:51PM (#9872013)
Can we have the program to do that transformation, so we can run it for ourselves?
Re:How Shazam works by samplenoise on Saturday July 11, 2015 @10:14PM (#9872365)
Overly concise Matlab version. If you get Dan Ellis' ispecgram [1] you can do something like:

    [x, sr] = wavread('rick.wav');
    x_mono = mean(x,2);
    X = specgram(x_mono, nfft, sr);
    Y = X >= imdilate(X, ones(mask_size), 'same');
    y = ispecgram(Y, nfft, sr);
    % wavwrite(y, sr, 'roll.wav');
params: nfft, masksize (tuple)

[1] http://github.com/tbertinmahieux/MSongsDB/blob/master/Matlab...