Hey nice project, I needed something like this!
I tested it out and you're right that it seems to be missing "obscure" songs but has no problems with mainstream songs. However it don't think its Shazam's fault, I tested the Shazam app itself and it's able to find lots of songs VinylPi is missing.
I'm new to Shazamio, but with trial and error, I found increasing RECORD_SECONDS from 3 to 15 and switching from shazam.recognize to shazam.recognize_song (related) made all the difference.
I suspect its due to how Shazamio's algorithm breaks up the recording into multiple samples: https://github.com/shazamio/ShazamIO/blob/master/shazamio/algorithm.py
So even though the recording is 15 seconds, its not actually sending 15 seconds of data (if I understand correctly).
The newest release introduced segment_duration_seconds so maybe that's part of it.
Admittedly I have spend more time looking into the code to be sure, but these two changes are getting much better results for me at least.
Hey nice project, I needed something like this!
I tested it out and you're right that it seems to be missing "obscure" songs but has no problems with mainstream songs. However it don't think its Shazam's fault, I tested the Shazam app itself and it's able to find lots of songs VinylPi is missing.
I'm new to Shazamio, but with trial and error, I found increasing
RECORD_SECONDSfrom3to15and switching fromshazam.recognizetoshazam.recognize_song(related) made all the difference.I suspect its due to how Shazamio's algorithm breaks up the recording into multiple samples: https://github.com/shazamio/ShazamIO/blob/master/shazamio/algorithm.py
So even though the recording is 15 seconds, its not actually sending 15 seconds of data (if I understand correctly).
The newest release introduced
segment_duration_secondsso maybe that's part of it.Admittedly I have spend more time looking into the code to be sure, but these two changes are getting much better results for me at least.