Create a great ShazamKit experience

RSS for tag

Discuss the WWDC23 Session Create a great ShazamKit experience

View Session

Posts under wwdc2023-10051 tag

6 Posts
Sort by:
Post not yet marked as solved
0 Replies
410 Views
Shazamkit's SHManagedSession() doesn't work on macOS 14 RC 23A339 Error code: AddInstanceForFactory: No factory registered for id <CFUUID 0x600000540340> F8BB1C28-BAE8-11D6-9C31-00039315CD46 HALC_ShellDevice.cpp:2,609 HALC_ShellDevice::RebuildControlList: couldn't find the control object Prepare call ignored, the caller does not have record permission Error The operation couldn’t be completed. (com.apple.ShazamKit error 202.)
Posted
by Ruizhe.
Last updated
.
Post not yet marked as solved
1 Replies
486 Views
I want use SHLibrary.default.items to show the music i recognized by Shazam. but SHLibrary.default.items always return empty list. I did an experiment and I called SHLibrary.default.items as soon as I entered on a page and it returned an empty list, but after use SHManagedSession to identify songs and then call SHLibrary.default.items it returned the result I wanted. Below is the test code private func bindEvent() { // call when View was create the items return empty if #available(iOS 17, *) { let items = SHLibrary.default.items print("-------->>>>>>>>\(items)") } self.addToMediaLibray.onTap { [weak self] in guard let `self` = self, let result = self.result, let appleMusicID = result.appleMusicID else { return } if #available(iOS 17, *) { // call when music was recognized the item is not empty. let items = SHLibrary.default.items print("1111-------->>>>>>>>\(items)") } } } The attach file is the part of result log My iOS Verion is iOS 17 (21A5326a) XCode Version is 15.0 beta 8 (15A5229m) The result log
Posted
by tbfungeek.
Last updated
.
Post not yet marked as solved
3 Replies
746 Views
https://developer.apple.com/documentation/shazamkit/shazamkit_dance_finder_with_managed_session The song detection is successful however with new APIs, I can't find this demo working with SHLibrary, it expect to display the RecentDanceRowView. I wonder if I missed any steps or the SHLibrary is not ready yet.
Posted
by Ruizhe.
Last updated
.
Post not yet marked as solved
0 Replies
419 Views
Looking to fill up a budget line for an iOs application we are trying to build. By adding ShazamKit to our app, how much cost the use of it per stream ? My research indicates that it is 0,00065$, correct ?
Posted
by utrema.
Last updated
.
Post not yet marked as solved
2 Replies
565 Views
Hi, I am using ShazamKit to detect songs from a live stream. I am using matchStreamingBuffer with a PCMBuffer. It looks like it works for the most part, but sometimes it throws an NSException. Here's the code calling the match: engine.mainMixerNode.installTap(onBus: 0, bufferSize: 4096, format: options.audioFormat) { buffer, time in do { self.session.matchStreamingBuffer(buffer, at: time) } catch { } } The exception: Supplied audio format is not supported <CMAudioFormatDescription 0x2828a29e0 [0x20f7863a0]> { mediaType:'soun' mediaSubType:'lpcm' mediaSpecific: { ASBD: { mSampleRate: 44100.000000 mFormatID: 'lpcm' mFormatFlags: 0x29 mBytesPerPacket: 4 mFramesPerPacket: 1 mBytesPerFrame: 4 mChannelsPerFrame: 2 mBitsPerChannel: 32 } cookie: {(null)} ACL: {Stereo (L R)} FormatList Array: { Index: 0 ChannelLayoutTag: 0x650002 ASBD: { mSampleRate: 44100.000000 mFormatID: 'lpcm' mFormatFlags: 0x29 mBytesPerPacket: 4 mFramesPerPacket: 1 mBytesPerFrame: 4 mChannelsPerFrame: 2 mBitsPerChannel: 32 }} } extensions: {(null)} } This is the stack stack: 0 CoreFoundation 0xa248 __exceptionPreprocess 1 libobjc.A.dylib 0x17a68 objc_exception_throw 2 ShazamKit 0x159d0 -[SHMutableSignature appendBuffer:atTime:error:] 3 ShazamKit 0x6d7c -[SHSignatureGenerator appendBuffer:atTime:error:] 4 ShazamKit 0x3968 -[SHSessionDriverSignatureSlot appendBuffer:atTime:error:] 5 ShazamKit 0x10430 -[SHSignatureBuffer flow:time:] 6 ShazamKit 0x2490 -[SHStreamingSessionDriver flow:time:] 7 ShazamKit 0xf784 -[SHSession matchStreamingBuffer:atTime:] 8 MyApp 0x17f69c thunk for @escaping @callee_guaranteed (@guaranteed AVAudioPCMBuffer, @guaranteed AVAudioTime) -> () (<compiler-generated>) 9 AVFAudio 0x482ac AVAudioNodeTap::TapMessage::RealtimeMessenger_Perform() 10 AVFAudio 0x71c4 CADeprecated::RealtimeMessenger::_PerformPendingMessages() 11 AVFAudio 0x471e4 invocation function for block in CADeprecated::RealtimeMessenger::RealtimeMessenger(applesauce::dispatch::v1::queue) I don't mind failing if the format is not good, but how can I avoid crashing?
Posted
by wotson.
Last updated
.