Post

Replies

Boosts

Views

Activity

AVSpeechSynthesizer is broken on iOS 17 in Xcode 15
When you initialize AVSpeechSynthesizer as View prorety in SwiftUI project in Xcode 15 with iOS 17 simulator, you get some comments in console: Failed to get sandbox extensions Query for com.apple.MobileAsset.VoiceServicesVocalizerVoice failed: 2 #FactoryInstall Unable to query results, error: 5 Unable to list voice folder Query for com.apple.MobileAsset.VoiceServices.GryphonVoice failed: 2 Unable to list voice folder Unable to list voice folder Query for com.apple.MobileAsset.VoiceServices.GryphonVoice failed: 2 Unable to list voice folder When you try to run utterance inside a Button as synthesizer.speak(AVSpeechUtterance(string: "iOS 17 broke TextToSpeech")), you get endless stream of warnings that repeaths on and on in console like this: AddInstanceForFactory: No factory registered for id <CFUUID 0x60000024f200> F8BB1C28-BAE8-11D6-9C31-00039315CD46 Cannot find executable for CFBundle 0x600003b2cd20 </Library/Developer/CoreSimulator/Volumes/iOS_21A328/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.0.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/TextToSpeechMauiSupport.framework> (not loaded) Failed to load first party audio unit from TextToSpeechMauiSupport.framework Could not instantiate audio unit. Error=Error Domain=NSOSStatusErrorDomain Code=-3000 "(null)" Could not instantiate audio unit. Error=Error Domain=NSOSStatusErrorDomain Code=-3000 "(null)" Could not instantiate audio unit. Error=Error Domain=NSOSStatusErrorDomain Code=-3000 "(null)" Could not instantiate audio unit. Error=Error Domain=NSOSStatusErrorDomain Code=-3000 "(null)" Could not instantiate audio unit. Error=Error Domain=NSOSStatusErrorDomain Code=-3000 "(null)" Couldn't find audio unit for request SSML Length: 40, Voice: [AVSpeechSynthesisProviderVoice 0x600002127e30] Name: Samantha, Identifier: com.apple.voice.compact.en-US.Samantha, Supported Languages ( "en-US" ), Age: 0, Gender: 0, Size: 0, Version: (null) VoiceProvider: Could not start synthesis for request SSML Length: 40, Voice: [AVSpeechSynthesisProviderVoice 0x600002127e30] Name: Samantha, Identifier: com.apple.voice.compact.en-US.Samantha, Supported Languages ( "en-US" ), Age: 0, Gender: 0, Size: 0, Version: (null), converted from tts request [TTSSpeechRequest 0x600003709680] iOS 17 broke TextToSpeech language: en-US footprint: compact rate: 0.500000 pitch: 1.000000 volume: 1.000000 Failed to speak request with error: Error Domain=TTSErrorDomain Code=-4010 "(null)". Attempting to speak again with fallback identifier: com.apple.voice.compact.en-US.Samantha CPU is under pressure (more than 100%). AVSpeechSynthesizer doesn't speak. All works fine on iOS 16. The code of View: import SwiftUI import AVFoundation struct ContentView: View { let synthesizer = AVSpeechSynthesizer() var body: some View { VStack { Button { synthesizer.speak(AVSpeechUtterance(string: "iOS 17 broke TextToSpeech")) } label: { Text("speak") } .buttonStyle(.borderedProminent) } .padding() } } #Preview { ContentView() } On the real device nothing at all happened. The same happens to my production app. I have so much crashes related to TextToSpeach and iOS 17. What's going on?
32
17
12k
Sep ’23
Forcing WKSupportsAlwaysOnDisplay to NO in info.plist causes animation lags in an app on watchOS
I am developing a companion app in SwiftUI for an existing iOS app. When setting WKSupportsAlwaysOnDisplay to NO in info.plist on the simulator and three different watches, animations start to lag: both in system components (like Picker) and custom ones. When WKSupportsAlwaysOnDisplay is set to YES and the user disables Always On mode support on the watch in system settings, there are no such animation issues. Deployment Target is installed on watchOS 9. The app supports Workout Processing and Audio background modes.
1
0
502
Jul ’23