Create custom catalogs at scale with ShazamKit

RSS for tag

Discuss the WWDC22 Session Create custom catalogs at scale with ShazamKit

Posts under wwdc2022-10028 tag

5 Posts

Post

Replies

Boosts

Views

Activity

Shazam fails to find match
Hi, I'm trying to convert a stream into a PCMBuffer and then use Shazam to match. Shazam always fails to match. I have a theory it "listens" to the playback at double speed or more. Starts from here: ... let format = audioEngine.outputNode.inputFormat(forBus: 0) guard let pcmBuffer = format.toPCMBuffer(frame: currentFrame) else {          return } session.matchStreamingBuffer(pcmBuffer, at: nil) Where toPCMBuffer is: extension AVAudioFormat {     func toPCMBuffer(frame: AudioFrame) -> AVAudioPCMBuffer? {         guard let pcmBuffer = AVAudioPCMBuffer(pcmFormat: self, frameCapacity: UInt32(frame.dataWrap.size[0]) / streamDescription.pointee.mBytesPerFrame) else {             return nil         }         pcmBuffer.frameLength = pcmBuffer.frameCapacity         for i in 0 ..< min(Int(pcmBuffer.format.channelCount), frame.dataWrap.size.count) {             frame.dataWrap.data[i]?.withMemoryRebound(to: Float.self, capacity: Int(pcmBuffer.frameCapacity)) { srcFloatsForChannel in                 pcmBuffer.floatChannelData?[i].assign(from: srcFloatsForChannel, count: Int(pcmBuffer.frameCapacity))             }         }         return pcmBuffer     } } AudioFrame is: final class AudioFrame: MEFrame {     var timebase = Timebase.defaultValue     var duration: Int64 = 0     var size: Int64 = 0     var position: Int64 = 0     var numberOfSamples = 0     let dataWrap: ByteDataWrap     public init(bufferSize: Int32, channels: Int32) {         dataWrap = ObjectPool.share.object(class: ByteDataWrap.self, key: "AudioData_\(channels)") { ByteDataWrap() }         if dataWrap.size[0] < bufferSize {             dataWrap.size = Array(repeating: Int(bufferSize), count: Int(channels))         }     } ... } and MEFrame is: extension MEFrame {     public var seconds: TimeInterval { cmtime.seconds }     public var cmtime: CMTime { timebase.cmtime(for: position) } }
3
1
1.7k
Apr ’23
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
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
945
Oct ’22
Is it possible to make Unity iOS App into iOS widget extension?
HELLO WORLD! I am currently developing an amazing Unity mini Game. The game development has come to the deploying stage. Using Unity allows me to deploy this game on MacOS, iOS, Android and Windows which is fantastic . However, I really need this game to have the iOS widget extension as a key feature on mobile. Just like the "Steve" dinosaur game which can be played in widget. I had seen a lot of tutorials and youtube videos but still cant find a solution which make Unity iOS app into a widget. If I really want to make widget Game on iOS, do I need to develop the whole game all over again in xcode or using GameKit? Really hoping there's a way to simply convert the Unity iOS app into a widget.
1
0
982
Sep ’22
Shazam CLI download
In the video, there is a demonstration of shazam tool. Where do I download it from? What is the process of getting it on mac os.
Replies
2
Boosts
0
Views
1.5k
Activity
Sep ’23
Shazam fails to find match
Hi, I'm trying to convert a stream into a PCMBuffer and then use Shazam to match. Shazam always fails to match. I have a theory it "listens" to the playback at double speed or more. Starts from here: ... let format = audioEngine.outputNode.inputFormat(forBus: 0) guard let pcmBuffer = format.toPCMBuffer(frame: currentFrame) else {          return } session.matchStreamingBuffer(pcmBuffer, at: nil) Where toPCMBuffer is: extension AVAudioFormat {     func toPCMBuffer(frame: AudioFrame) -> AVAudioPCMBuffer? {         guard let pcmBuffer = AVAudioPCMBuffer(pcmFormat: self, frameCapacity: UInt32(frame.dataWrap.size[0]) / streamDescription.pointee.mBytesPerFrame) else {             return nil         }         pcmBuffer.frameLength = pcmBuffer.frameCapacity         for i in 0 ..< min(Int(pcmBuffer.format.channelCount), frame.dataWrap.size.count) {             frame.dataWrap.data[i]?.withMemoryRebound(to: Float.self, capacity: Int(pcmBuffer.frameCapacity)) { srcFloatsForChannel in                 pcmBuffer.floatChannelData?[i].assign(from: srcFloatsForChannel, count: Int(pcmBuffer.frameCapacity))             }         }         return pcmBuffer     } } AudioFrame is: final class AudioFrame: MEFrame {     var timebase = Timebase.defaultValue     var duration: Int64 = 0     var size: Int64 = 0     var position: Int64 = 0     var numberOfSamples = 0     let dataWrap: ByteDataWrap     public init(bufferSize: Int32, channels: Int32) {         dataWrap = ObjectPool.share.object(class: ByteDataWrap.self, key: "AudioData_\(channels)") { ByteDataWrap() }         if dataWrap.size[0] < bufferSize {             dataWrap.size = Array(repeating: Int(bufferSize), count: Int(channels))         }     } ... } and MEFrame is: extension MEFrame {     public var seconds: TimeInterval { cmtime.seconds }     public var cmtime: CMTime { timebase.cmtime(for: position) } }
Replies
3
Boosts
1
Views
1.7k
Activity
Apr ’23
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
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
945
Activity
Oct ’22
Is it possible to make Unity iOS App into iOS widget extension?
HELLO WORLD! I am currently developing an amazing Unity mini Game. The game development has come to the deploying stage. Using Unity allows me to deploy this game on MacOS, iOS, Android and Windows which is fantastic . However, I really need this game to have the iOS widget extension as a key feature on mobile. Just like the "Steve" dinosaur game which can be played in widget. I had seen a lot of tutorials and youtube videos but still cant find a solution which make Unity iOS app into a widget. If I really want to make widget Game on iOS, do I need to develop the whole game all over again in xcode or using GameKit? Really hoping there's a way to simply convert the Unity iOS app into a widget.
Replies
1
Boosts
0
Views
982
Activity
Sep ’22