ShazamKit

RSS for tag

Get exact audio matching for any audio source using the Shazam catalog or a custom catalog in an app.

Posts under ShazamKit tag

68 Posts

Post

Replies

Boosts

Views

Activity

Is there a request rate limit for ShazamKit?
Hi, I'm developing an android app that uses ShazamKit. I know that there is an hourly requests rate limit for the Apple Music API, but I can't find anything about ShazamKit. Is there also a rate limit for ShazamKit? If yes, how can I find it since I'm using the SDK and not doing direct call API?
1
0
1.7k
Dec ’21
Improve match results (iOS/ Android)
The resulted matches from a custom catalog on both iOS/ Android are a bit delayed (1-3+ seconds) How to test? (iOS) Prepare AVAudioPlayer with recorded audio. Load custom catalog & listen to recorded audio from an external source. When a match is found, play recorded audio from the AVAudioPlayer at: predictedCurrentMatchOffset Result: 1-3+ seconds delayed matches Question How to improve or filter the resulting matches to be close if not exact to the external audio source? Experimental Filtering results by frequencySkew close to 0, does not minimize delayed matches. [{     "sh_audioStartDate" = "2021-11-24 12:34:42 +0000";     "sh_frequencySkew" = "2.222024e-05";     "sh_matchOffset" = "388.3738065670163";     "sh_score" = "4302.546";     "sh_speedSkew" = "0.0009712927";     "sh_title" = ItemTitle; }] Printing the matchedMediaItems, there is a “sh_score”, maybe we can experiment with? But it’s not a public property Best regards.
1
0
1.3k
Dec ’21
Android custom catalog match
Hello, we've encountered issues on Android using Custom Catalogs. On Android the only possible way to create a custom catalog is using .addFromCatalog() from a .shazamcatalog file, there is no method like iOS SDK provides .addReferenceSignature() to add a signature. Generating from iOS a .shazamcatalog file and loading in Android returns wrong values for query signature duration: Android catalog.minimumQuerySignatureDurationInMs: 3000 catalog.maximumQuerySignatureDurationInMs: 2147483647 iOS minQuerySignDuration: 1.0 seconds maxQuerySignDuration: 12.0 seconds No match resulting for Android but iOS works as expected. Is it possible to match against a custom catalog on Android? Any help will be much appreciated.
3
0
1.6k
Nov ’21
ShazamKit failing to get matches on Android
I'm trying to test ShazamKit on Android. In the following Kotlin snippet, I load apple-test-wav.wav - a 9 second long, 48khz, 16bit PCM WAV audio snippet of the Food Math example video - and attempt to match it against the FoodMath.shazamsignature custom catalog. This audio is not capture via a microphone, it's a clean sample directly from the video and I can't get it to match. The output is always: NoMatch Am I doing something obviously wrong here? override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) CoroutineScope(Dispatchers.IO).launch { searchCatalog() } } private suspend fun searchCatalog() { val file = context?.assets?.open("apple-test-wav.wav") if (file != null) { val bytes = file.readBytes() file.close() val signatureGenerator = (ShazamKit.createSignatureGenerator(AudioSampleRateInHz.SAMPLE_RATE_48000) as ShazamKitResult.Success).data signatureGenerator.append(bytes, bytes.size, System.currentTimeMillis()) val signature = signatureGenerator.generateSignature() val inputStream: InputStream? = context?.assets?.open("FoodMath.shazamsignature") if (inputStream!= null) { val catalog = ShazamKit.createCustomCatalog().apply { addFromCatalog(inputStream) } val session = (ShazamKit.createSession(catalog) as ShazamKitResult.Success).data val matchResult: MatchResult = session.match(signature) println(matchResult.toString()) } else { println("no input stream") } } }
1
0
1.2k
Oct ’21
Public key needed for ShazamKit Integration with Android App
This is first time I am developing android app using sdk provided by Apple. I want to integrate Shazamkit in my app but after going through all documents & steps, I got my private key, team id everything except "Public key" for token, as I am not able to create valid access token using jwt, I am not able to use ShazamKit. So if possible please let me know from where I can get this key or am I missing some step? Thank you in advance.
0
0
713
Oct ’21
ShazamKit: Music detection "session.match(signature)" with no match found and no error was thrown, weird
Today, I create a small app to try ShazamKit music detection ability in iOS 15. Follow a tutorial on Youtube, and I have Apple developer membership and have enabled the ShazamKit service for this app identifier. In short, I want to detect a song metadata with ShazamKit from the audio file inside app. The problem is that both of delegate method didFind and didNotFindMatchFor didn't fire though I have generated the signature successfully. I think it should give me an error in didNotFindMatchFor delegate method if there is no match found at least, but it doesn't. It's a pretty new feature, there is not that much related stuff I could find. What am I missing here? Appreciate for any help. More info: I do find some stuff using audioEngine, however that use output from Microphone, if user listen music with a headphone, that would be not possible. In my case I want to use the file itself since my production app is a music player, which stores a lot audio files in sandbox. import ShazamKit import UIKit class ViewController: UIViewController { lazy var recoButton: UIButton = { let button = UIButton(frame: CGRect(x: 0, y: 0, width: 120, height: 60)) button.layer.cornerRadius = 8 button.backgroundColor = .brown button.setTitle("Recognize", for: .normal) button.addTarget(self, action: #selector(recognizeSong), for: .touchUpInside) return button }() override func viewDidLoad() { super.viewDidLoad() view.addSubview(recoButton) recoButton.center = view.center } @objc func recognizeSong(_ sender: UIButton) { print("reco button tapped") // ShazamKit is available from iOS 15 if #available(iOS 15, *) { // session let session = SHSession() // delegate session.delegate = self do { // get track guard let url = Bundle.main.url(forResource: "Baby One More Time", withExtension: "mp3") else { print("url is NULLLL") return } // create audio file let file = try AVAudioFile(forReading: url) let frameCapacity = AVAudioFrameCount(file.length / 26) // Audio -> Buffer guard let buffer = AVAudioPCMBuffer(pcmFormat: file.processingFormat, frameCapacity: frameCapacity) else { print("Failed to create a buffer") return } // Read file into buffer try file.read(into: buffer) // SignatureGenerator let generator = SHSignatureGenerator() try generator.append(buffer, at: nil) // create signature let signature = generator.signature() // try to match session.match(signature) } catch { print(error) } } else { // unavailable alert } } } extension ViewController: SHSessionDelegate { func session(_ session: SHSession, didFind match: SHMatch) { print("Match found!") // get results let items = match.mediaItems items.forEach { item in print(item.title ?? "title") print(item.artist ?? "artist") print(item.artworkURL?.absoluteURL ?? "artwork url") } } func session(_ session: SHSession, didNotFindMatchFor signature: SHSignature, error: Error?) { if let error = error { print(error) } } }
2
0
1.6k
Oct ’21
ShazamKit API URL
Hey, I wanted to use the ShazamKit API in a web application but it seems like the framework is only for iOS and Android. I came across this resource but it's not very clear how it works as they direct traffic to their own server: https://rapidapi.com/apidojo/api/shazam Does anyone know if there is an official URL for the Shazam API and how I can use it? Thanks
1
0
1k
Oct ’21
Where is the License Agreement for Android version of ShazamKit?
I want to create and publish Android app which uses ShazamKit, but I can't find License Agreement for Android version of ShazamKit, which means I can't publish APK legally. also I want to include aar file to GitHub repository for build in CI, but I can't include aar file legally without explicit allow from Apple. Where is the License Agreement for Android version of ShazamKit?
0
1
779
Oct ’21
Is there a request rate limit for ShazamKit?
Hi, I'm developing an android app that uses ShazamKit. I know that there is an hourly requests rate limit for the Apple Music API, but I can't find anything about ShazamKit. Is there also a rate limit for ShazamKit? If yes, how can I find it since I'm using the SDK and not doing direct call API?
Replies
1
Boosts
0
Views
1.7k
Activity
Dec ’21
Improve match results (iOS/ Android)
The resulted matches from a custom catalog on both iOS/ Android are a bit delayed (1-3+ seconds) How to test? (iOS) Prepare AVAudioPlayer with recorded audio. Load custom catalog & listen to recorded audio from an external source. When a match is found, play recorded audio from the AVAudioPlayer at: predictedCurrentMatchOffset Result: 1-3+ seconds delayed matches Question How to improve or filter the resulting matches to be close if not exact to the external audio source? Experimental Filtering results by frequencySkew close to 0, does not minimize delayed matches. [{     "sh_audioStartDate" = "2021-11-24 12:34:42 +0000";     "sh_frequencySkew" = "2.222024e-05";     "sh_matchOffset" = "388.3738065670163";     "sh_score" = "4302.546";     "sh_speedSkew" = "0.0009712927";     "sh_title" = ItemTitle; }] Printing the matchedMediaItems, there is a “sh_score”, maybe we can experiment with? But it’s not a public property Best regards.
Replies
1
Boosts
0
Views
1.3k
Activity
Dec ’21
Android custom catalog match
Hello, we've encountered issues on Android using Custom Catalogs. On Android the only possible way to create a custom catalog is using .addFromCatalog() from a .shazamcatalog file, there is no method like iOS SDK provides .addReferenceSignature() to add a signature. Generating from iOS a .shazamcatalog file and loading in Android returns wrong values for query signature duration: Android catalog.minimumQuerySignatureDurationInMs: 3000 catalog.maximumQuerySignatureDurationInMs: 2147483647 iOS minQuerySignDuration: 1.0 seconds maxQuerySignDuration: 12.0 seconds No match resulting for Android but iOS works as expected. Is it possible to match against a custom catalog on Android? Any help will be much appreciated.
Replies
3
Boosts
0
Views
1.6k
Activity
Nov ’21
ShazamKit failing to get matches on Android
I'm trying to test ShazamKit on Android. In the following Kotlin snippet, I load apple-test-wav.wav - a 9 second long, 48khz, 16bit PCM WAV audio snippet of the Food Math example video - and attempt to match it against the FoodMath.shazamsignature custom catalog. This audio is not capture via a microphone, it's a clean sample directly from the video and I can't get it to match. The output is always: NoMatch Am I doing something obviously wrong here? override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) CoroutineScope(Dispatchers.IO).launch { searchCatalog() } } private suspend fun searchCatalog() { val file = context?.assets?.open("apple-test-wav.wav") if (file != null) { val bytes = file.readBytes() file.close() val signatureGenerator = (ShazamKit.createSignatureGenerator(AudioSampleRateInHz.SAMPLE_RATE_48000) as ShazamKitResult.Success).data signatureGenerator.append(bytes, bytes.size, System.currentTimeMillis()) val signature = signatureGenerator.generateSignature() val inputStream: InputStream? = context?.assets?.open("FoodMath.shazamsignature") if (inputStream!= null) { val catalog = ShazamKit.createCustomCatalog().apply { addFromCatalog(inputStream) } val session = (ShazamKit.createSession(catalog) as ShazamKitResult.Success).data val matchResult: MatchResult = session.match(signature) println(matchResult.toString()) } else { println("no input stream") } } }
Replies
1
Boosts
0
Views
1.2k
Activity
Oct ’21
Public key needed for ShazamKit Integration with Android App
This is first time I am developing android app using sdk provided by Apple. I want to integrate Shazamkit in my app but after going through all documents & steps, I got my private key, team id everything except "Public key" for token, as I am not able to create valid access token using jwt, I am not able to use ShazamKit. So if possible please let me know from where I can get this key or am I missing some step? Thank you in advance.
Replies
0
Boosts
0
Views
713
Activity
Oct ’21
ShazamKit: Music detection "session.match(signature)" with no match found and no error was thrown, weird
Today, I create a small app to try ShazamKit music detection ability in iOS 15. Follow a tutorial on Youtube, and I have Apple developer membership and have enabled the ShazamKit service for this app identifier. In short, I want to detect a song metadata with ShazamKit from the audio file inside app. The problem is that both of delegate method didFind and didNotFindMatchFor didn't fire though I have generated the signature successfully. I think it should give me an error in didNotFindMatchFor delegate method if there is no match found at least, but it doesn't. It's a pretty new feature, there is not that much related stuff I could find. What am I missing here? Appreciate for any help. More info: I do find some stuff using audioEngine, however that use output from Microphone, if user listen music with a headphone, that would be not possible. In my case I want to use the file itself since my production app is a music player, which stores a lot audio files in sandbox. import ShazamKit import UIKit class ViewController: UIViewController { lazy var recoButton: UIButton = { let button = UIButton(frame: CGRect(x: 0, y: 0, width: 120, height: 60)) button.layer.cornerRadius = 8 button.backgroundColor = .brown button.setTitle("Recognize", for: .normal) button.addTarget(self, action: #selector(recognizeSong), for: .touchUpInside) return button }() override func viewDidLoad() { super.viewDidLoad() view.addSubview(recoButton) recoButton.center = view.center } @objc func recognizeSong(_ sender: UIButton) { print("reco button tapped") // ShazamKit is available from iOS 15 if #available(iOS 15, *) { // session let session = SHSession() // delegate session.delegate = self do { // get track guard let url = Bundle.main.url(forResource: "Baby One More Time", withExtension: "mp3") else { print("url is NULLLL") return } // create audio file let file = try AVAudioFile(forReading: url) let frameCapacity = AVAudioFrameCount(file.length / 26) // Audio -> Buffer guard let buffer = AVAudioPCMBuffer(pcmFormat: file.processingFormat, frameCapacity: frameCapacity) else { print("Failed to create a buffer") return } // Read file into buffer try file.read(into: buffer) // SignatureGenerator let generator = SHSignatureGenerator() try generator.append(buffer, at: nil) // create signature let signature = generator.signature() // try to match session.match(signature) } catch { print(error) } } else { // unavailable alert } } } extension ViewController: SHSessionDelegate { func session(_ session: SHSession, didFind match: SHMatch) { print("Match found!") // get results let items = match.mediaItems items.forEach { item in print(item.title ?? "title") print(item.artist ?? "artist") print(item.artworkURL?.absoluteURL ?? "artwork url") } } func session(_ session: SHSession, didNotFindMatchFor signature: SHSignature, error: Error?) { if let error = error { print(error) } } }
Replies
2
Boosts
0
Views
1.6k
Activity
Oct ’21
ShazamKit API URL
Hey, I wanted to use the ShazamKit API in a web application but it seems like the framework is only for iOS and Android. I came across this resource but it's not very clear how it works as they direct traffic to their own server: https://rapidapi.com/apidojo/api/shazam Does anyone know if there is an official URL for the Shazam API and how I can use it? Thanks
Replies
1
Boosts
0
Views
1k
Activity
Oct ’21
Where is the License Agreement for Android version of ShazamKit?
I want to create and publish Android app which uses ShazamKit, but I can't find License Agreement for Android version of ShazamKit, which means I can't publish APK legally. also I want to include aar file to GitHub repository for build in CI, but I can't include aar file legally without explicit allow from Apple. Where is the License Agreement for Android version of ShazamKit?
Replies
0
Boosts
1
Views
779
Activity
Oct ’21