Posts

Post not yet marked as solved
4 Replies
0 Views
More info: no messages until metadataQuery.start() all messages before: print("notification Received from metadata query" .publisher(for: NSNotification.Name.NSMetadataQueryDidFinishGathering,object: nil) metadataQuery = NSMetadataQuery() metadataQuery.searchScopes = [NSMetadataQueryUbiquitousDocumentsScope] metadataQuery.predicate = NSPredicate(format: "(%K LIKE 'Saved.plist') OR (%K CONTAINS 'Album') ",NSMetadataItemFSNameKey,NSMetadataItemFSNameKey)//071918c metadataQuery.start() albumlistPublisher.sink(receiveCompletion: { _ in print("notification Received from metadata query")} , receiveValue: { Value in let query = (Value.object as! NSMetadataQuery) print("albumListPublisherSink: found \(query.resultCount) albums") print("notification Received from metadata query")}) }
Post not yet marked as solved
1 Replies
0 Views
I encountered a similar problem and solved it by not allowing speech recognition and speech to occur at the the same time. In your case, could you disable speech recoginition when the "play" button is pressed and re-enable it after the playing has finished?