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

no result #4

Open
djculex opened this issue Oct 5, 2018 · 27 comments
Open

no result #4

djculex opened this issue Oct 5, 2018 · 27 comments
Labels

Comments

@djculex
Copy link

djculex commented Oct 5, 2018

Looks like the request server is working but respons is null ? Maybe the servers changed url ?

@tomer8007
Copy link
Owner

Yeah, I actually noticed a few days ago that Shazam returns to me an error code on matching which I don't know exactly what causes it.

image

I noticed that the code doesn't handle that case appropriately so I'm working on a newer version to try to fix this.

image

@tomer8007 tomer8007 added the bug label Oct 5, 2018
@ghost
Copy link

ghost commented Jan 5, 2019

Any update on this?

@tomer8007
Copy link
Owner

tomer8007 commented Jan 5, 2019

Unfortunately it seems like they broke this old API (orbit.shazam.com) that was used on Windows 10. I tried sending different parameters but either I get a more basic error or that I get the "Internal Error" again.

From reversing the Android application I can see that now they're using a new API which apparently requires an audio signature. This would be quite hard to mimic because it's implemented in a binary library (so file).

EDIT: If anybody have an appx file of the original Shazam for Windows 8/10 on x86, This could be pretty helpful.

@ahmed605
Copy link

ahmed605 commented Jan 7, 2019

Unfortunately it seems like they broke this old API (orbit.shazam.com) that was used on Windows 10. I tried sending different parameters but either I get a more basic error or that I get the "Internal Error" again.

From reversing the Android application I can see that now they're using a new API which apparently requires an audio signature. This would be quite hard to mimic because it's implemented in a binary library (so file).

EDIT: If anybody have an appx file of the original Shazam for Windows 8/10 on x86, This could be pretty helpful.

I have original Shazam windows 8 pc appx (unfortunately old one) : https://mega.nz/#!FJRWSA4A!zCr1qnraTkdEXsoEsJaI75Ody_4wu5_0RU6ly5jInBw

@ahmed605
Copy link

ahmed605 commented Jan 7, 2019

I have also ported shazam for windows phone 8.1 to win10 pc but it's not working also: https://mega.nz/#!ZBIEHSRQ!ZVqKjuve1L9MSu4cMgQc-VUkqpPoCJrHdPoVZpP7ekM

@tomer8007
Copy link
Owner

tomer8007 commented Jan 7, 2019

@ahmed605 Nice, I'll try to install it. Is this app actually working fo you?
@Patraskon It was taken down from the store, it's now "not available", that's why I asked for an appx file.

@ahmed605
Copy link

ahmed605 commented Jan 7, 2019

@ahmed605 Nice, I'll try to install it. Is this app actually working fo you?
@Patraskon It was taken down from the store, it's now "not available", that's why I asked for an appx file.

Unfortunately no (for me) but you can download any "not available" appx from the store with this website: https://store.rg-adguard.net/ for ex this is ShazamEntertainmentLtd.Shazam_4.7.9.0_neutral_~_pqbynwjfrbcg4.appxbundle : http:https://tlu.dl.delivery.mp.microsoft.com/filestreamingservice/files/42893d2a-6de0-42b4-8d4c-1af6a0065fa1?P1=1546893424&P2=402&P3=2&P4=Z2ooHCvgR9M6lw6APzmxThGSMbwykko9U415zp2QWaWgFNtOEdisJ3G6jjW5JkTotsm5A3L2AKhOW6zqcFSizA%3d%3d

EDIT: You can use .so libs in C# using mono https://www.mono-project.com/docs/advanced/pinvoke/

@Alexa81
Copy link

Alexa81 commented Mar 9, 2019

Hello! Shazam, not working?

@dedsecorg
Copy link

Hello! Shazam, not working?

Was wondering the same? someone has maybe a earlier version that works? there should be some history here on github, im just to drunk to watch that right now..

@djculex
Copy link
Author

djculex commented Nov 11, 2019

I've been trying to get it to work with pure c# without javascript, but this guy seem to have found a way to make the two work.

https://github.com/AlekseyMartynov/shazam-win10

@tomer8007
Copy link
Owner

tomer8007 commented Nov 11, 2019

@djculex
Interesting, he's using https://amp.shazam.com/shazam. I should have invested more in installing an old appx file...

@AlekseyMartynov
Copy link

Thanks for the mention. My project simply wraps Shazam.dll from the WinRT app. The trick was to load it into ordinary NET. Made possible by https://github.com/Alovchin91/WinRTDesktopInterop.

@tomer8007
Copy link
Owner

@AlekseyMartynov Cool, Did you take the ShazamCore.dll from an x86 appx of Shazam for Windows 10 that was taken down from the store, or did you use the Windows Phone app maybe?

I ask because it is different from the one I was using.

@AlekseyMartynov
Copy link

It's from the store app.

@ahmed605
Copy link

I'm working on a new project called FlairMax it's like Shazam but for Windows 10/Windows Mobile 10 and even with more features than Android version of Shazam check news on Twitter: @flairmaxuwp https://twitter.com/FlairMaxUWP?s=09

FlairMax is a music recognition app that tell you the some information on the recognized track like: tittle, duration, genres, artist, release date, album, recognized part time (alpha, because it can mistake when the recognized part is repeated in the track), lyrics, synced lyrics (can be saved in many lyrics/subtitles formats), Deezer Link, YouTube Link, Spotify Link and Track HQ direct download link and there's another features like: show synced lyrics, Compact Overlay(PIP/AOS) mode, open track links in UWP apps/clients (MyTube, Perfect Tube, Spotify App, Deezer App, ....) if installed and many other features.

@tomer8007
Copy link
Owner

@ahmed605 Does it use Shazam servers? Otherwise, did you implement your own music fingerprinting?

@ahmed605
Copy link

@tomer8007 no, it uses ACRcloud, Musixmatch, Google, Youtube, Spotify and Deezer servers

NOTE:I created my own music fingerprint because ACRcloud for UWP doesn't support Auto Fingerprinting so the program uploads fingerprints not audio files.

@djculex
Copy link
Author

djculex commented Nov 14, 2019

@djculex
Interesting, he's using https://amp.shazam.com/shazam. I should have invested more in installing an old appx file...

Yeah, I kind of knew that. Fiddler showed pretty much how and where the new requests were going, but I can figure out how to capture from file or line-in only from what you have set as microphone

@tomer8007
Copy link
Owner

@djculex Are you trying to use @AlekseyMartynov 's project with a microphone which is not "Stereo Mix"?

@djculex
Copy link
Author

djculex commented Nov 15, 2019

@tomer8007 No I'm trying to use @AlekseyMartynov project with a saved file sample instead of a micophone. ;-)

@VIEWVIEWVIEW
Copy link

Has anyone found out how shazam generates the audio signature?
Fyi, their API has moved over to POST:https://ocdn.shazamid.com/orbit/DoAmpTag1/android?country=DE&language=en-US
The API expects the following the body (shazam 6.1.1-160119):

--A3r_ISAAC_eQeY2Bh
Content-Disposition: form-data; name="language"
en_US
--A3r_ISAAC_eQeY2Bh
Content-Disposition: form-data; name="applicationIdentifier"
#0x0
--A3r_ISAAC_eQeY2Bh
Content-Disposition: form-data; name="deviceId"
#0x0
--A3r_ISAAC_eQeY2Bh
Content-Disposition: form-data; name="deviceModel"
#0x0
--A3r_ISAAC_eQeY2Bh
Content-Disposition: form-data; name="cryptToken"
#0x0
--A3r_ISAAC_eQeY2Bh
Content-Disposition: form-data; name="deviceFingerprint"
#0x0
--A3r_ISAAC_eQeY2Bh
Content-Disposition: form-data; name="deviceOS"
#0x0
--A3r_ISAAC_eQeY2Bh
Content-Disposition: form-data; name="service"
cn=US,cn=V11,cn=SmartClub,cn=ShazamiD,cn=services
--A3r_ISAAC_eQeY2Bh
Content-Disposition: form-data; name="tagDate"
#0x0
--A3r_ISAAC_eQeY2Bh
Content-Disposition: form-data; name="sample"; filename="janet.sig"
Content-Type: application/octet-stream
\xc5\xd8\x06\xc9\x95v\xa2 \x86\x1f\x01\xdf\xf0y@J\xc1a\xb9\x0f\xe7\x97\xd5\x80\xder\xf7\x7f\xaa\x1c\x87\xf8\\\xe3\xc8\xa4	\xb3\xe2\x9e\x8aA\xa84iGa\xc59k\xe1\x892\xd1\xfcq\x8a\xd6l\x0bx:\xf6\x90\xc7m\xd6\xcd@\x08\xc8S9k\xe1\x892\xd1\xfcq\x98\xbe\x08\x871\xb7\xb5\xf4\xa2\x17\x07\xad7;\xcb\x95k\xb9\xd2\xb9:
A\xb6\x8c"\x1f\x98\xf2d\x02 n\xda\x92\xa1\x02N\xb6E9k\xe1\x892\xd1\xfcqk\xd7Z\x90\xb3\xbe&\xdd$\xbc\xb0\x19\x1b\x96\xa0\xc3.`\xc4\xe9\x1d\x85\xd0_\x86\xaa\x90\xd5\xa7\xc6.=\xc5R!*^N\xdb\x909B.\xd1\xb2\xb5*\x99
\xf7\x87\xdc(\x1d\xe3\xf3\xc6\xca\xb1A\x9a\xcb\xb7\x8ds|\xec\xba8>\xbf|9k\xe1\x892\xd1\xfcq\x1b#I@s\x14\xdfk\xaeO\x1eRQ9\x18+\xb5H\x8d\x9dOa0\x9a\xeb\x9e\xdf\x1d\xe8\x84\xa1J$\xb4s"r\x94\xfe\xe7\x14\xc9A\x97y\x1bL\x00\x94F\xed&k\x82\xc4\xbe5>\xf6Z\xe8\xa8\xd7\x96\xd2\x0b+\xc3o@\xa4\x9e\x8f\x8e\xaa{!<\x138-`M\x10s\x9a\\\x9a\xfcY\xa82\xab\x9c\xc0`\xf3\xf0Ky3\xaf\xa3-\x97s\x98\xb0\xd0\xcc\x13:\x98F\x15\xdc\xde\x1eMs\xae\xee\x8de\x1d\x0b)r\xf3\x81\x99\xe5\x1e\x80X\x98\xbd\x03\xe0\x81.\x05$\x15?K\xba99x(\x842y;KtW\xed
\xd4a\x92\x98\xbf\xf9ScF\x11B\xfe\xe5{\x1e\xb17\x14q\xd5\xd3K
\xafT\xd7\xa2\xd5L\xf1\xdfVB\xa7\xdc\xe7\x9e/\x93\xc1\xf4U\xa4k\x11\xe0n\x89E\xdcV\x18Z\x9c7\xdc~\x15\x9d\xb0\xa9#\x82|\xca\x9dV\x87$\xe4\x89]\xfc~\x843t\xa4S\x9d\x9e!\x86\xb3\xce\xc1'9k\xe1\x892\xd1\xfcq\x97\x1a\xaa;Vl\x9f1	-3\xfa\xdf\x18\x08\xad\xe3\xb3\x80\xb0\xdd\xce\x83kw\x19\xe7
\xc8\xe44/\xa8\x8fA\xaf\x85fa\xde\xb4\xa1\x98\xc7`\xbb""\xb1\xb8\xcf\xf2\xbf\xfb\xa0Uf\xa2\x13\xe3\xb6\x8f\xaa\xf8\x1c$\x93z\x80Wgx\xa2\x88/#\x85]\xd8x\xd3\x10\xf4\x81\x08Z\x1a\x9a\x13\xce\xc4\xb9\x00\x82\xdf\xcb	\x14\x9ax\x7f\xaam\xb5k\x90\xf8\x85\xa5\xa0\x05\xb3|\x90\xe1\xc6\x8b\xa6\x00\x1c\x19R._9(\x15\x11r\x97G\x96\xfft"\xb42v5\x82\x86\xd6'\x9f\xbc\x94\x10O\x93\xf5\xe1\x19\xed\x99[\xfb\xe1\xea\x11\xae\xf4\xbc3\xfc\x1b\xedLL\x94|B\\,\xdb\xacc\x84tl\x9c\xab\xbd\xba\x08\xb8
\xfd\xfb\x8c\x85\x15\xdb\xa9`\xc6\xf7M\x8e\x19\xdf\x0f\xa0
\xc4\xd1CH\xed_\x12\x96H	\xc4\xc3\xbd\x9b\x9f\x11\xcfF\xd5*\x9c\xafd\x86L\xe8\x921\xff\x92"\x0f\xe7}\x11m"9k\xe1\x892\xd1\xfcq
--A3r_ISAAC_eQeY2Bh
Content-Disposition: form-data; name="sampleBytes"
#0x0
--A3r_ISAAC_eQeY2Bh
Content-Disposition: form-data; name="sampleLength"
#0x0
--A3r_ISAAC_eQeY2Bh
Content-Disposition: form-data; name="tagId"
#0x0
--A3r_ISAAC_eQeY2Bh
Content-Disposition: form-data; name="tagTime"
#0x0
--A3r_ISAAC_eQeY2Bh
Content-Disposition: form-data; name="tagTimezone"
#0x0
--A3r_ISAAC_eQeY2Bh
Content-Disposition: form-data; name="coverartSize"
#0x0
--A3r_ISAAC_eQeY2Bh
Content-Disposition: form-data; name="addoniconSize"
#0x0
--A3r_ISAAC_eQeY2Bh
Content-Disposition: form-data; name="context"
#0x0
--A3r_ISAAC_eQeY2Bh--

Having the whole API reversed is imo better than relying on proprietary binaries for windows.

@tomer8007
Copy link
Owner

Are you reversing the Android app? Take a look at libShazamMRE.so and ShazamSigX.java. They're calling getSignatureJrl() and stuff.

@tomer8007
Copy link
Owner

tomer8007 commented Dec 9, 2019

Here's some thoughts I wrote a few months ago while trying to understand what APIs they use out of libShazamMRE.so to get the signature from the audio buffer (based on /sources/com/shazam.sig/c.java, as well as sources/com/shazam.sig/ShazamSigX.java):

  1. this.a = new float[32];
  2. this.output = new int[262144]
  3. constructJrV()
  4. initJrI(int sampleRate)
  5. setupSpectralOutput(4, 1, 4096, this.output)
  6. long currentSpectralFrameIndex = getCurrentSpectralFrameIndex();
    this.b += (long) (((i / 2) * PlacePickerFragment.DEFAULT_RADIUS_IN_METERS) / this.f);
    flowJrI(byte[] audio, i / 2);
  7.  int spectralFrameIndex = getSpectralFrameIndex(((getCurrentSpectralFrameIndex() - currentSpectralFrameIndex ) >> 1) + currentSpectralFrameIndex );
     for (int i = 0; i < this.a.length; i++) {
         this.a[i] = ((float) this.output[spectralFrameIndex + i]) / 32767.0f;
     }
    
  8. byte[] signature = getSignatureJrl()

This has to be some sort of a spectral-based signature.

@AlekseyMartynov

This comment has been minimized.

@tomer8007
Copy link
Owner

tomer8007 commented Aug 5, 2020

@AlekseyMartynov Cool, Also it's worth looking at this article which explains the spectral peaking algorithm of Shazam and the idea behind it (If you haven't yet). It's based on a papaer written by the developers.

EDIT: This project and this project (and actually many others) appear to try to extract this kind of fingerprintng.

@gokhanfehimoglu
Copy link

Okay, all of the fingerprinting information and working examples (both fingerprinting and getting track information from Shazam) written in Rust and Python can be found in this useful repo: https://github.com/marin-m/SongRec

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

No branches or pull requests

9 participants