Skip to content
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

Android version performs poorly compared to the official Shazam app #5

Open
mregnauld opened this issue Apr 11, 2023 · 2 comments
Open

Comments

@mregnauld
Copy link

mregnauld commented Apr 11, 2023

Following each step as described here, I implemented the example, and managed to make it work on both Android and iOS (thanks by the way for the detailed explanation).

That being said, I tested it with that song (I know, it's some weird stuff, but that's the purpose of the test), and here are the results:

  • the official Shazam app recognizes it instantly
  • your example on iOS recognizes it correctly, though after 3 to 4 seconds
  • your example on Android doesn't manage to recognize it, even after trying it multiple times

More importantly: I made the test with the official Shazam app and the Android version of your example on the same device.

I made some research and found out that thread where it says that it could come from the maximumQuerySignatureDuration, but since I use the javascript script given in your documentation to generate the developer token, I already use the maximum expiration delay (which is 180 days). I even tried with the maximum allowed delay, which is exactly 15777000 seconds, but still not working. Not sure if it refers to that or not, though.

Any help would be very welcomed.

@mregnauld
Copy link
Author

mregnauld commented Apr 12, 2023

I just found out the origin of the problem!

In ShazamManager.startListening(), you use 41000 for the sample rate, instead of using 44100 for example, which is one of the expected sample rates, as you can see here.

I tried with 44100 Hz and it works way better!

@mregnauld
Copy link
Author

Fixed in #6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant