In iOS 18 beta, the SoundAnalysis framework reports an error when the iPhone is locked

I use SoundAnalysis to analyze background sounds and have enabled background permissions. It worked well in previous iOS systems, but a warning appeared in the new iOS18beta version and sound analysis was stopped. Warning List: Execution of the command buffer was aborted due to an error during execution. Insufficient Permission (to submit GPU work from background) [Espresso::handle_ex_plan] exception=Espresso exception: "Generic error": Insufficient Permission (to submit GPU work from background) (00000006:kIOGPUCommandBufferCallbackErrorBackgroundExecutionNotPermitted); code=7 status=-1 Unable to compute the prediction using a neural network model. It can be an invalid input data or broken/unsupported model (error code: -1). CoreML prediction failed with Error Domain=com.apple.CoreML Code=0 "Failed to evaluate model 0 in pipeline" UserInfo={NSLocalizedDescription=Failed to evaluate model 0 in pipeline, NSUnderlyingError=0x30330e910 {Error Domain=com.apple.CoreML Code=0 "Failed to evaluate model 1 in pipeline" UserInfo={NSLocalizedDescription=Failed to evaluate model 1 in pipeline, NSUnderlyingError=0x303307840 {Error Domain=com.apple.CoreML Code=0 "Unable to compute the prediction using a neural network model. It can be an invalid input data or broken/unsupported model (error code: -1)." UserInfo={NSLocalizedDescription=Unable to compute the prediction using a neural network model. It can be an invalid input data or broken/unsupported model (error code: -1).}}}}}

Hi, maybe you found a solution?

This bug only happens on a real device because it works fine in the simulator.

Feedback ID is FB15150861

Hi Jason, do you have any solution for this issue? I have the same problem. Thanks.

Hi Jason, I have the same issue with iOS18. When the app enters the background, analyzing sound does no longer work. Works fine since iOS15!

I'am using the SNAudioStreamAnalyzer https://developer.apple.com/documentation/soundanalysis/snaudiostreamanalyzer

Thanks! Ralph

In iOS 18 beta, the SoundAnalysis framework reports an error when the iPhone is locked
 
 
Q