SongRec
SongRec copied to clipboard
calling from python with chunks of sets
Great Project!
I want to use this to get the ids of track from sets. So let's say I have the audio file of a set, how would I approach it? I would like to have something like a sliding window over the set and use songrec on each window so that I get the time-stamps where the songs change.
I would write a small python scripts which calls SongRec (I don't know any rust).
Does this code just take the raw 12s PCM signals of the middle of the song and return it? Does the algorithm always expect 12s of pcm-data?
https://github.com/marin-m/SongRec/blob/59246d69648032dc4f5817eb3575e550f22d65fc/src/fingerprinting/algorithm.rs#L37
Hello,
I took the approach of extracting 12-second samples out of the middle of files/out of the recent microphone input because it seemed to be a value that provided very good results compared to shorter window sizes, without taking too much processing time.
The core algorithm may look for for frequency peaks over any amount of spectrogram, but if you put more audio into it obviously it will take longer (it performs sliding Fourier transforms over fixed intervals).
Regards,
ok, then I think I will just experimentally decide how long the samples should be and how fast I should slide the window over. I just noticed I wasn't clear, I was talking about DJ-Sets. So I have 2/3 hours long of music and I want to find every song in the set. I'll just try, thanks!