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

75 Posts

Post

Replies

Boosts

Views

Activity

Microphone feedback noise and can I use the output to recognise?
I recently released my first ShazamKit app, but there is one thing that still bothers me. When I started I followed the steps as documented by Apple right here : https://developer.apple.com/documentation/shazamkit/shsession/matching_audio_using_the_built-in_microphone however when I was running this on iPad I receive a lot of high pitched feedback noise when I ran my app with this configuration. I got it to work by commenting out the output node and format and only use the input. But now I want to be able to recognise the song that’s playing from the device that has my app open and was wondering if I need the output nodes for that or if I can do something else to prevent the Mic. Feedback from happening. In short: What can I do to prevent feedback from happening Can I use the output of a device to recognise songs or do I just need to make sure that the microphone can run at the same time as playing music? Other than that I really love the ShazamKit API and can highly recommend to have a go with it! This is the code as documented in the above link (I just added the comments of what broke it for me) func configureAudioEngine() { // Get the native audio format of the engine's input bus. let inputFormat = audioEngine.inputNode.inputFormat(forBus: 0) // THIS CREATES FEEDBACK ON IPAD PRO let outputFormat = AVAudioFormat(standardFormatWithSampleRate: 48000, channels: 1) // Create a mixer node to convert the input. audioEngine.attach(mixerNode) // Attach the mixer to the microphone input and the output of the audio engine. audioEngine.connect(audioEngine.inputNode, to: mixerNode, format: inputFormat) // THIS CREATES FEEDBACK ON IPAD PRO audioEngine.connect(mixerNode, to: audioEngine.outputNode, format: outputFormat) // Install a tap on the mixer node to capture the microphone audio. mixerNode.installTap(onBus: 0, bufferSize: 8192, format: outputFormat) { buffer, audioTime in // Add captured audio to the buffer used for making a match. self.addAudio(buffer: buffer, audioTime: audioTime) } }
3
0
2.7k
Feb ’23
ShazamKit not working on ios16
Hi. I made a feature for my app. It can use shazamkit to recognize the audio content of a media file. It works well on ios15, but since ios16 has been released, it doesn't work. On the SHSession callback delegate, there are two functions to determine is the match succeeded or something goes wrong and get an error, but either not called from the framework in ios16. I am wondering about that, maybe some privacy thing is blocking the framework delegate calls? Does anyone know the answer? Thanks!
2
0
771
Jan ’23
Unable to Fetch Lyrics of Identified Song (ShazamKit)
I am in the process of writing an app that can listen to an audio snippet and then display the song title, artist, and album picture. It is supposed to also display the lyrics or the link to the Shazam website if it is unable to return the lyrics. I used the following website as a resource while doing my development: https://rudrank.blog/experimenting-with-shazamkit#music-recognition The code below shows how I get the lyrics of a song that has already been identified. Every time I use my app to get the lyrics, it gives me the following error: TLS ticket does not fit (6884 > 6144) https://api.lyrics.ovh/v1/Stray Kids/Thunderous cannotProcessdata I would appreciate it greatly if anyone could help me fix this problem and get a valid outcome for the lyrics using the ShazamKit api   struct LyricsAPI {       var resourceURL : URL   var url = "https://api.lyrics.ovh/v1/"   var artist : String   var song : String       init(artist: String, song: String){     self.song = song     self.artist = artist     let completeURL = url + artist + "/" + song     print(completeURL)     if let resourceURL = URL(string: completeURL) {       self.resourceURL = resourceURL     } else {       self.resourceURL = completeURL.getCleanedURL()!     }   }       func fetchLyrics(completion: @escaping(Result<SongDetails, ErrorStatus>)->Void) {     let dataTask = URLSession.shared.dataTask(with: resourceURL) { data, _, _ in       guard let jsonData = data else {         completion(.failure(.noDataAvailable))         return       }       do {         let decoder = JSONDecoder()         decoder.keyDecodingStrategy = .convertFromSnakeCase         let reponse = try decoder.decode(SongDetails.self, from: jsonData)         completion(.success(reponse))                 } catch {         completion(.failure(.cannotProcessdata))       }     }     dataTask.resume()   }}`
1
1
1.2k
Dec ’22
Improve audio match results - Android
Hello, Are the Android results expected to be similar to the iOS version? Tests below calculating after: "live audio offset - shazam predicted match offset" iOS Tests 16 ms 15 ms 18 ms 11 ms Android Tests 4823 ms -159 ms 4365 ms -4657 ms 900 ms *negative value means that Shazam returned a timestamp ahead of the live audio *tests were done against multiple audio files (studio recordings) How did I generate the signatures and catalogs? using Shazam CLI Android ShazamKit version: 2.0.0 What can we do to improve Android results? Best regards!
1
0
1.3k
Nov ’22
Shazamkit for android is missing information.
Hi, dear apple developers. Is there any full example about shazamkit for android developers? I've found that There is no full example about how to use shazamkit to build an android app propertly in WHOLE Internet(eg: github etc.).... the documentation below is missing a lot of information. https://developer.apple.com/shazamkit/android/ Especially how to associate MediaItem with signature. https://developer.apple.com/shazamkit/android/shazamkit/com.shazam.shazamkit/-media-item/index.html in swift we can use customCatalog.addReferenceSignature(signature, representing: [mediaItem]) but I can't see anything about it in kotlin So, is there more information about it?
4
0
1.8k
Nov ’22
Shazam CLI and signatureIDs
How best to access the signatureID from a signature? Our library of original music contains around 50,000 tracks and grows by about 3,000 tracks a year. I use a loop to process all these tracks and generate a shazamcatalog - which I then use to detect tracks with duplicate audio chunks. The tracks have a single meta-data tag, our library fileID. I would like to be able to 'remove' tracks from the catalog, so from what I gather, I'll need the signatureID for each track. But the only way to get the signatureID (that I see in the shazam man pages) is to use either the 'display' or the 'export' command on the catalog. With 50,000 signatures in the catalog, this is not very useful! I can loop through these to grab the csv files, which seem to have the signatureID as the filename, and the fileID tag inside, and from this I can create a sqlite table to look up signatureIDs for fileIDs. But I have to regenerate after updating shazam with new tracks. Is there an easier way that I'm missing? Some way to get the signatureID for a signature without getting the entire catalog dump? (I store the generated signature files to use when matching). Any help much appreciated
0
0
935
Oct ’22
ShazamKit with custom catalog match issue
I have the following situation: I took 3 audio files and generated a Shazam signature for each I created a custom catalog with these 3 signatures All 3 audio items have an identical 40 second intro When I create a SHSession with my custom catalog and try to match audio from that common intro section, the matcher returns on the delegate method session(_ session: SHSession, didFind match: SHMatch) - without exception - only 1 object in the match.mediaItems array. For example: if didFind is called once per second, for signatures A, B, C, I would get a random sequence like - A, B, A, A, C, C, B, A (it's different every time). According to the documentation, mediaItems should contain all 3 sounds represented by the signatures as possible matches: mediaItems - An array of the media items in the catalog that match the query signature, in order of the quality of the match. The catalog was built by loading the signature files from disk: let signatureData = try Data(contentsOf: sigUrl) let signature = try SHSignature(dataRepresentation: signatureData) let mediaItem = SHMediaItem(properties: [.title: sigName]) try customCatalog.addReferenceSignature(signature, representing: [mediaItem]) I tried matching: with session.matchStreamingBuffer(buffer, at: audioTime) (so sending the audio input directly to the matching session) by creating a signature of the recorded audio for different durations (from 3 to 15 seconds recording duration) and sending the signature to the matcher to session.match(signature). I also tried the async/await version, for the small chance of implementation differences between the two but I always, without exception, only get 1 item in the mediaItems array. Everything else seems to be working correctly - apart from matching within the common section. Does anyone have any suggestions about this? Is it expected behaviour or a ShazamKit bug?
4
0
1.3k
Aug ’22
Creating ShazamKit signatures from audio files
I was trying to generate a signature from an audio file on-disk. Loading the files work, however generating signatures from them don't seem to work. Here's the code I'm using to generate the signature: func signature(from asset: AVAudioFile) -> SHSignature? {     let format = asset.processingFormat     let frameCount = AVAudioFrameCount(asset.length)           guard let buffer = AVAudioPCMBuffer(pcmFormat: format, frameCapacity: frameCount) else { return nil }     let generator = SHSignatureGenerator()           do {        try asset.read(into: buffer)                let sampleRate = asset.processingFormat.sampleRate                try generator.append(buffer, at: AVAudioTime(sampleTime: .zero, atRate: sampleRate))                return generator.signature()     } catch {        print(error)        return nil     } } There are no errors being thrown in the code, but when I try to use the signatures in an SHSession, the audio is not being recognised. However, using the Shazam library works. I have tried searching ways to do this, however the only examples I've seen are for generating signatures from live audio input. Is there something I'm missing from the code above?
3
0
2.2k
Jul ’22
Matching on simulator but not device
Hi, I have built an app that is based on ShazamKit custom catalog. It works fine when I test it using the simulator. However when I deploy it on my ios 15.5 device, it does not work. It matches the first item and that it. It keeps calling the delegate but match is always equal to the first item.    func session(_ session: SHSession, didFind match: SHMatch) {     if let first = match.mediaItems.first {       if let mediaItemTitle = first.title {         if (title != mediaItemTitle) {           title = mediaItemTitle         }       }     }   }
1
0
868
Jul ’22
Best strategy for a "Sing that Tune" game?
I am trying to build a "Sing that Tune" game. For example: The app will tell the user to sing, "Row row your boat." The user will sing "Row row your boat" into the microphone. If the user's melody is close enough to the actual melody, the game is won. My question: Since I'm dealing with live audio that might be "correct" but not "exact," is the best strategy to use ShazamKit and an SHCustomCatalog, or is it better to use Create ML and sound classification? I know Create ML model can learn the difference between a baby and a firetruck, but can it learn the difference between a good guess and a wrong guess of a sung melody? Thank you, Eli
1
0
1k
Jul ’22
Audio crashes when connected to AirPods
Hi There, Whenever I want to use the microphone for my ShazamKit app while connected to AirPods my app crashes with a "Invalid input sample rate." message. I've tried multiple formats but keep getting this crash. Any pointers would be really helpful. func configureAudioEngine() { do { try audioSession.setCategory(.playAndRecord, options: [.mixWithOthers, .defaultToSpeaker, .allowAirPlay, .allowBluetoothA2DP ,.allowBluetooth]) try audioSession.setActive(false, options: .notifyOthersOnDeactivation) } catch { print(error.localizedDescription) } guard let engine = audioEngine else { return } let inputNode = engine.inputNode let inputNodeFormat = inputNode.inputFormat(forBus: 0) let audioFormat = AVAudioFormat( standardFormatWithSampleRate: inputNodeFormat.sampleRate, channels: 1 ) // Install a "tap" in the audio engine's input so that we can send buffers from the microphone to the signature generator. engine.inputNode.installTap(onBus: 0, bufferSize: 1024, format: audioFormat) { buffer, audioTime in self.addAudio(buffer: buffer, audioTime: audioTime) } } ```
2
1
2.4k
Jul ’22
Music's Intellectual Property issues in Apple Music API and ShazamKit
Hello. I'm a beginner developer trying to release a music app. My app is, Use Shazamkit to provide information about music (such as album image of a song, music title and genre, etc.) that the user receives via audio. Through Apple Music API, provide information about music searched by users (such as artist image, album image, playlist image, title and artist name, genre, etc.). However, it was rejected by reviewers for the following reasons. 5.2.1(e) Legal: Intellectual Property - General Of course, I am a member of the Apple Developer Program, and even though I only used APIs and Kits provided by Apple, I was rejected due to copyright issues. For reference, my app does not have upload/download functions for audio and video, and does not include playback functions. How do I resolve copyright issues? Thank you.
1
0
1.6k
Jun ’22
How to? ShazamKit and streaming audio?
Hi all, I have an app that is playing music from http live streams using AVPlayer. Have been trying to figure out how to use ShazamKit to recognise the music playing but I just can't figure out how to do it :-( Works well with local files and microphone recordings, but how do I get the data from a stream that is currently playing??? Feels like I tried everything... Have tried to install an MTAudioProcessingTap but it doesn't seem to work on streaming assets even though I can get hold of the proper AVAssetTrack containing the audio. No callback with data are received? Bug? I can open the streaming url and just save the bytes to disk and that's fine, but I'm not in sync with what is playing in AVPlayerItem so the recognition isn't working with the same audio data as the user is currently hearing. Hmmm. Any suggestions and ideas are welcome. It would be such a nice feature for my app so I'm really looking forward to solving this. Thx in advance / Jörgen, Bitfield
2
0
1.4k
Mar ’22
Use ShazamKit for commercial app with many daily requests
Hi, I've been asked to develop a software for macOS that monitors daily 24/7 some streamings and logs the aired music. I'd like to use ShazamKit, by the way I don't know if I have to do something in particular in order to use it in a commercial app and I don't know if with so many requests I can hit some threshold (it could be 10 simultaneous streams, it could be 100 simultaneous streams, I don't know at the moment). Any info about that?
0
0
895
Jan ’22
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
Microphone feedback noise and can I use the output to recognise?
I recently released my first ShazamKit app, but there is one thing that still bothers me. When I started I followed the steps as documented by Apple right here : https://developer.apple.com/documentation/shazamkit/shsession/matching_audio_using_the_built-in_microphone however when I was running this on iPad I receive a lot of high pitched feedback noise when I ran my app with this configuration. I got it to work by commenting out the output node and format and only use the input. But now I want to be able to recognise the song that’s playing from the device that has my app open and was wondering if I need the output nodes for that or if I can do something else to prevent the Mic. Feedback from happening. In short: What can I do to prevent feedback from happening Can I use the output of a device to recognise songs or do I just need to make sure that the microphone can run at the same time as playing music? Other than that I really love the ShazamKit API and can highly recommend to have a go with it! This is the code as documented in the above link (I just added the comments of what broke it for me) func configureAudioEngine() { // Get the native audio format of the engine's input bus. let inputFormat = audioEngine.inputNode.inputFormat(forBus: 0) // THIS CREATES FEEDBACK ON IPAD PRO let outputFormat = AVAudioFormat(standardFormatWithSampleRate: 48000, channels: 1) // Create a mixer node to convert the input. audioEngine.attach(mixerNode) // Attach the mixer to the microphone input and the output of the audio engine. audioEngine.connect(audioEngine.inputNode, to: mixerNode, format: inputFormat) // THIS CREATES FEEDBACK ON IPAD PRO audioEngine.connect(mixerNode, to: audioEngine.outputNode, format: outputFormat) // Install a tap on the mixer node to capture the microphone audio. mixerNode.installTap(onBus: 0, bufferSize: 8192, format: outputFormat) { buffer, audioTime in // Add captured audio to the buffer used for making a match. self.addAudio(buffer: buffer, audioTime: audioTime) } }
Replies
3
Boosts
0
Views
2.7k
Activity
Feb ’23
ShazamKit not working on ios16
Hi. I made a feature for my app. It can use shazamkit to recognize the audio content of a media file. It works well on ios15, but since ios16 has been released, it doesn't work. On the SHSession callback delegate, there are two functions to determine is the match succeeded or something goes wrong and get an error, but either not called from the framework in ios16. I am wondering about that, maybe some privacy thing is blocking the framework delegate calls? Does anyone know the answer? Thanks!
Replies
2
Boosts
0
Views
771
Activity
Jan ’23
Unable to Fetch Lyrics of Identified Song (ShazamKit)
I am in the process of writing an app that can listen to an audio snippet and then display the song title, artist, and album picture. It is supposed to also display the lyrics or the link to the Shazam website if it is unable to return the lyrics. I used the following website as a resource while doing my development: https://rudrank.blog/experimenting-with-shazamkit#music-recognition The code below shows how I get the lyrics of a song that has already been identified. Every time I use my app to get the lyrics, it gives me the following error: TLS ticket does not fit (6884 > 6144) https://api.lyrics.ovh/v1/Stray Kids/Thunderous cannotProcessdata I would appreciate it greatly if anyone could help me fix this problem and get a valid outcome for the lyrics using the ShazamKit api   struct LyricsAPI {       var resourceURL : URL   var url = "https://api.lyrics.ovh/v1/"   var artist : String   var song : String       init(artist: String, song: String){     self.song = song     self.artist = artist     let completeURL = url + artist + "/" + song     print(completeURL)     if let resourceURL = URL(string: completeURL) {       self.resourceURL = resourceURL     } else {       self.resourceURL = completeURL.getCleanedURL()!     }   }       func fetchLyrics(completion: @escaping(Result<SongDetails, ErrorStatus>)->Void) {     let dataTask = URLSession.shared.dataTask(with: resourceURL) { data, _, _ in       guard let jsonData = data else {         completion(.failure(.noDataAvailable))         return       }       do {         let decoder = JSONDecoder()         decoder.keyDecodingStrategy = .convertFromSnakeCase         let reponse = try decoder.decode(SongDetails.self, from: jsonData)         completion(.success(reponse))                 } catch {         completion(.failure(.cannotProcessdata))       }     }     dataTask.resume()   }}`
Replies
1
Boosts
1
Views
1.2k
Activity
Dec ’22
Improve audio match results - Android
Hello, Are the Android results expected to be similar to the iOS version? Tests below calculating after: "live audio offset - shazam predicted match offset" iOS Tests 16 ms 15 ms 18 ms 11 ms Android Tests 4823 ms -159 ms 4365 ms -4657 ms 900 ms *negative value means that Shazam returned a timestamp ahead of the live audio *tests were done against multiple audio files (studio recordings) How did I generate the signatures and catalogs? using Shazam CLI Android ShazamKit version: 2.0.0 What can we do to improve Android results? Best regards!
Replies
1
Boosts
0
Views
1.3k
Activity
Nov ’22
Shazamkit for android is missing information.
Hi, dear apple developers. Is there any full example about shazamkit for android developers? I've found that There is no full example about how to use shazamkit to build an android app propertly in WHOLE Internet(eg: github etc.).... the documentation below is missing a lot of information. https://developer.apple.com/shazamkit/android/ Especially how to associate MediaItem with signature. https://developer.apple.com/shazamkit/android/shazamkit/com.shazam.shazamkit/-media-item/index.html in swift we can use customCatalog.addReferenceSignature(signature, representing: [mediaItem]) but I can't see anything about it in kotlin So, is there more information about it?
Replies
4
Boosts
0
Views
1.8k
Activity
Nov ’22
Shazam CLI and signatureIDs
How best to access the signatureID from a signature? Our library of original music contains around 50,000 tracks and grows by about 3,000 tracks a year. I use a loop to process all these tracks and generate a shazamcatalog - which I then use to detect tracks with duplicate audio chunks. The tracks have a single meta-data tag, our library fileID. I would like to be able to 'remove' tracks from the catalog, so from what I gather, I'll need the signatureID for each track. But the only way to get the signatureID (that I see in the shazam man pages) is to use either the 'display' or the 'export' command on the catalog. With 50,000 signatures in the catalog, this is not very useful! I can loop through these to grab the csv files, which seem to have the signatureID as the filename, and the fileID tag inside, and from this I can create a sqlite table to look up signatureIDs for fileIDs. But I have to regenerate after updating shazam with new tracks. Is there an easier way that I'm missing? Some way to get the signatureID for a signature without getting the entire catalog dump? (I store the generated signature files to use when matching). Any help much appreciated
Replies
0
Boosts
0
Views
935
Activity
Oct ’22
ShazamKit with custom catalog match issue
I have the following situation: I took 3 audio files and generated a Shazam signature for each I created a custom catalog with these 3 signatures All 3 audio items have an identical 40 second intro When I create a SHSession with my custom catalog and try to match audio from that common intro section, the matcher returns on the delegate method session(_ session: SHSession, didFind match: SHMatch) - without exception - only 1 object in the match.mediaItems array. For example: if didFind is called once per second, for signatures A, B, C, I would get a random sequence like - A, B, A, A, C, C, B, A (it's different every time). According to the documentation, mediaItems should contain all 3 sounds represented by the signatures as possible matches: mediaItems - An array of the media items in the catalog that match the query signature, in order of the quality of the match. The catalog was built by loading the signature files from disk: let signatureData = try Data(contentsOf: sigUrl) let signature = try SHSignature(dataRepresentation: signatureData) let mediaItem = SHMediaItem(properties: [.title: sigName]) try customCatalog.addReferenceSignature(signature, representing: [mediaItem]) I tried matching: with session.matchStreamingBuffer(buffer, at: audioTime) (so sending the audio input directly to the matching session) by creating a signature of the recorded audio for different durations (from 3 to 15 seconds recording duration) and sending the signature to the matcher to session.match(signature). I also tried the async/await version, for the small chance of implementation differences between the two but I always, without exception, only get 1 item in the mediaItems array. Everything else seems to be working correctly - apart from matching within the common section. Does anyone have any suggestions about this? Is it expected behaviour or a ShazamKit bug?
Replies
4
Boosts
0
Views
1.3k
Activity
Aug ’22
How do I create the .shazamsignature file?
I want to create my own custom audio recognition with ShazamKit, when opening the sample project I found the FoodMath.shazamsignature file. I believe there is a way to generate that file based on my audio collections. How do I create the .shazamsignature file? Thanks.
Replies
5
Boosts
0
Views
3.9k
Activity
Jul ’22
Creating ShazamKit signatures from audio files
I was trying to generate a signature from an audio file on-disk. Loading the files work, however generating signatures from them don't seem to work. Here's the code I'm using to generate the signature: func signature(from asset: AVAudioFile) -> SHSignature? {     let format = asset.processingFormat     let frameCount = AVAudioFrameCount(asset.length)           guard let buffer = AVAudioPCMBuffer(pcmFormat: format, frameCapacity: frameCount) else { return nil }     let generator = SHSignatureGenerator()           do {        try asset.read(into: buffer)                let sampleRate = asset.processingFormat.sampleRate                try generator.append(buffer, at: AVAudioTime(sampleTime: .zero, atRate: sampleRate))                return generator.signature()     } catch {        print(error)        return nil     } } There are no errors being thrown in the code, but when I try to use the signatures in an SHSession, the audio is not being recognised. However, using the Shazam library works. I have tried searching ways to do this, however the only examples I've seen are for generating signatures from live audio input. Is there something I'm missing from the code above?
Replies
3
Boosts
0
Views
2.2k
Activity
Jul ’22
Is it possible to get a certainty of the match ShazamKit gives?
Hey there, I was wondering if it's possible to check how "certain" ShazamKit is with the match. For example; I'd only change the result when the SHMatch has an accuracy/certainty of at least 80% I know there's a frequencySkew on the SHMatchedMediaItem but I'm not sure if that could be helpful
Replies
3
Boosts
0
Views
1.3k
Activity
Jul ’22
Matching on simulator but not device
Hi, I have built an app that is based on ShazamKit custom catalog. It works fine when I test it using the simulator. However when I deploy it on my ios 15.5 device, it does not work. It matches the first item and that it. It keeps calling the delegate but match is always equal to the first item.    func session(_ session: SHSession, didFind match: SHMatch) {     if let first = match.mediaItems.first {       if let mediaItemTitle = first.title {         if (title != mediaItemTitle) {           title = mediaItemTitle         }       }     }   }
Replies
1
Boosts
0
Views
868
Activity
Jul ’22
Best strategy for a "Sing that Tune" game?
I am trying to build a "Sing that Tune" game. For example: The app will tell the user to sing, "Row row your boat." The user will sing "Row row your boat" into the microphone. If the user's melody is close enough to the actual melody, the game is won. My question: Since I'm dealing with live audio that might be "correct" but not "exact," is the best strategy to use ShazamKit and an SHCustomCatalog, or is it better to use Create ML and sound classification? I know Create ML model can learn the difference between a baby and a firetruck, but can it learn the difference between a good guess and a wrong guess of a sung melody? Thank you, Eli
Replies
1
Boosts
0
Views
1k
Activity
Jul ’22
Audio crashes when connected to AirPods
Hi There, Whenever I want to use the microphone for my ShazamKit app while connected to AirPods my app crashes with a "Invalid input sample rate." message. I've tried multiple formats but keep getting this crash. Any pointers would be really helpful. func configureAudioEngine() { do { try audioSession.setCategory(.playAndRecord, options: [.mixWithOthers, .defaultToSpeaker, .allowAirPlay, .allowBluetoothA2DP ,.allowBluetooth]) try audioSession.setActive(false, options: .notifyOthersOnDeactivation) } catch { print(error.localizedDescription) } guard let engine = audioEngine else { return } let inputNode = engine.inputNode let inputNodeFormat = inputNode.inputFormat(forBus: 0) let audioFormat = AVAudioFormat( standardFormatWithSampleRate: inputNodeFormat.sampleRate, channels: 1 ) // Install a "tap" in the audio engine's input so that we can send buffers from the microphone to the signature generator. engine.inputNode.installTap(onBus: 0, bufferSize: 1024, format: audioFormat) { buffer, audioTime in self.addAudio(buffer: buffer, audioTime: audioTime) } } ```
Replies
2
Boosts
1
Views
2.4k
Activity
Jul ’22
Music's Intellectual Property issues in Apple Music API and ShazamKit
Hello. I'm a beginner developer trying to release a music app. My app is, Use Shazamkit to provide information about music (such as album image of a song, music title and genre, etc.) that the user receives via audio. Through Apple Music API, provide information about music searched by users (such as artist image, album image, playlist image, title and artist name, genre, etc.). However, it was rejected by reviewers for the following reasons. 5.2.1(e) Legal: Intellectual Property - General Of course, I am a member of the Apple Developer Program, and even though I only used APIs and Kits provided by Apple, I was rejected due to copyright issues. For reference, my app does not have upload/download functions for audio and video, and does not include playback functions. How do I resolve copyright issues? Thank you.
Replies
1
Boosts
0
Views
1.6k
Activity
Jun ’22
ShazamKit license agreement
Hi, I'm developing an app with ShazamKit and I'd like to check its license agreement in order to know what I can and what I can't do, but I can't find it anywhere. Is there any link where I can find it?
Replies
1
Boosts
0
Views
1.4k
Activity
Jun ’22
How to? ShazamKit and streaming audio?
Hi all, I have an app that is playing music from http live streams using AVPlayer. Have been trying to figure out how to use ShazamKit to recognise the music playing but I just can't figure out how to do it :-( Works well with local files and microphone recordings, but how do I get the data from a stream that is currently playing??? Feels like I tried everything... Have tried to install an MTAudioProcessingTap but it doesn't seem to work on streaming assets even though I can get hold of the proper AVAssetTrack containing the audio. No callback with data are received? Bug? I can open the streaming url and just save the bytes to disk and that's fine, but I'm not in sync with what is playing in AVPlayerItem so the recognition isn't working with the same audio data as the user is currently hearing. Hmmm. Any suggestions and ideas are welcome. It would be such a nice feature for my app so I'm really looking forward to solving this. Thx in advance / Jörgen, Bitfield
Replies
2
Boosts
0
Views
1.4k
Activity
Mar ’22
Music recogniser with http stream url.
How to get song title & artist using shazam, i have done with local file & microphone listen but using live Http stream radio url not working. Please any one have idea please reply.
Replies
1
Boosts
0
Views
1.4k
Activity
Mar ’22
Use ShazamKit for commercial app with many daily requests
Hi, I've been asked to develop a software for macOS that monitors daily 24/7 some streamings and logs the aired music. I'd like to use ShazamKit, by the way I don't know if I have to do something in particular in order to use it in a commercial app and I don't know if with so many requests I can hit some threshold (it could be 10 simultaneous streams, it could be 100 simultaneous streams, I don't know at the moment). Any info about that?
Replies
0
Boosts
0
Views
895
Activity
Jan ’22
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