-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Speedup peak spreading #32
Conversation
Fixes tests
Big Update... Fix SEARCH_ARTIST (New API Method) Added black. Micro fixes. Added tests. Change min python 3.6 to 3.8+
Fix failed UUID dataclass_factory test
Fix hang when recognize_song feed with less than 8ms sound
This pull request introduces 1 alert and fixes 1 when merging ff1080f into 3f3c7b9 - view on LGTM.com new alerts:
fixed alerts:
|
@Dronablo, Please post tests before and after implementing the numpy library. |
Add test for numpy do_peak_spreading version
Done |
This pull request introduces 1 alert when merging 4f9e493 into 3f3c7b9 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging a957803 into 3f3c7b9 - view on LGTM.com new alerts:
|
test: async def tasks():
a = [main(), main(), main(), main(), main(), main(), main()]
res = await asyncio.gather(*a)
return res before: 6.474631299999601 realy good |
@Dronablo, Thx! |
I tried
recognize_song
on different inputs and py-spy shows that most of the time was spent not on waiting response from Shazam itself, but on waiting fordo_peak_spreading()
. My timings was like '1.5 seconds in preak_spreading for 3 seconds of input or 6 seconds in preak_spreading for 10 seconds of input`.So, here is a numpy implementation: