shazamio / ShazamIO

🎵 Is a free asynchronous library from reverse engineered Shazam API written in Python 3.8+ with asyncio and aiohttp.
MIT License
521 stars 76 forks source link

How long in seconds can ShazamIO analyze? #97

Closed Root-FTW closed 7 months ago

Root-FTW commented 8 months ago

I have several audios of more than 2 or 3 minutes where the music starts to play because the audio advances a lot and I realized that in those cases ShazamIO does not detect the song.

So I decided to split my audios in fragments of 15 seconds and pass them to ShazamIO and in that case if it detects the song, it means that ShazamIO can not analyze audios with much duration, but I would like to know what is the limit of the duration that supports to analyze.

dotX12 commented 8 months ago

Hi @Root-FTW, I've never tested this. I always sent fragments of 5-20 seconds of one track.

lukafilipxvic commented 7 months ago

Hello, I found that the maximum recognition duration is 12 seconds. If you add print(data) to the send_recognize_request_v2 function in api.py, you can see what data is sent in the request, including how long the sample is in milliseconds (samplems). The max value I have seen is 12000ms. Any audio after the 12 second mark is ignored. Hope that helps!

Root-FTW commented 7 months ago

Hello, I found that the maximum recognition duration is 12 seconds. If you add print(data) to the send_recognize_request_v2 function in api.py, you can see what data is sent in the request, including how long the sample is in milliseconds (samplems). The max value I have seen is 12000ms. Any audio after the 12 second mark is ignored. Hope that helps!

thank you very much, this information will help me a lot!!