Post

Replies

Boosts

Views

Activity

Reply to AVSpeechSynthesizer is broken on iOS 17 in Xcode 15
I wrote this code to test the 158 available voices on XCODE15 and iOS17, so far the 10 I tested are crashing the app. Fred en-US is working. Can we get more hands to test the whole list and provide the working voices? https://gist.github.com/Koze/d1de49c24fc28375a9e314c72f7fdae4 Thanks. import SwiftUI import AVFoundation // Define a struct to hold voice information struct VoiceInfo: Comparable { var name: String var language: String var identifier: String static func < (lhs: VoiceInfo, rhs: VoiceInfo) -> Bool { if lhs.language == rhs.language { return lhs.name < rhs.name } return lhs.language < rhs.language } } struct ContentView: View { @State private var selectedVoice = 0 @State private var textToSpeak = "Hello, World!" let synthesizer = AVSpeechSynthesizer() // Create and sort the array of voice information let voices: [VoiceInfo] = [ VoiceInfo(name: "Majed", language: "ar-001", identifier: "com.apple.voice.compact.ar-001.Maged"), ... ].sorted() var body: some View { VStack { Picker("Select a Voice", selection: $selectedVoice) { ForEach(0 ..< voices.count, id: \.self) { index in Text("\(voices[index].name) (\(voices[index].language))") .tag(index) } } .pickerStyle(WheelPickerStyle()) .padding() TextField("Enter text to speak", text: $textToSpeak) .textFieldStyle(RoundedBorderTextFieldStyle()) .padding() Button("Speak") { speakText() } .padding() } } func speakText() { let utterance = AVSpeechUtterance(string: textToSpeak) utterance.voice = AVSpeechSynthesisVoice(identifier: voices[selectedVoice].identifier) synthesizer.speak(utterance) } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } } #Preview { ContentView() }
Oct ’23
Reply to AVSpeechSynthesizer is broken on iOS 17 in Xcode 15
Hello All, I am having very similar errors like the first original post since I updated to XCODE 15 and simulating on iOS 17.x.x. I did NOT have issues related to Text to Speech while I was working on XCODE 14.3.1 and simulating on iOS 16.4 before the update in development and in production. Here are the errors I am getting from XCODE 15 simulating on iOS 17.x.x. The simulator freezes and I receive below errors: 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 Query for com.apple.MobileAsset.VoiceServicesVocalizerVoice failed: 2 Unable to list voice folder Query for com.apple.MobileAsset.VoiceServices.GryphonVoice failed: 2 Unable to list voice folder 1 log/signpost messages lost due to high rates in live mode recording. To guarantee delivery of all logs, set IDELogRedirectionPolicy to oslogToStdio in the environment of the executable. Query for com.apple.MobileAsset.VoiceServices.GryphonVoice failed: 2 Unable to list voice folder 1 log/signpost messages lost due to high rates in live mode recording. To guarantee delivery of all logs, set IDELogRedirectionPolicy to oslogToStdio in the environment of the executable. ... Followed by tens of thousands of these errors: Couldn't find audio unit for request SSML Length: 17, Voice: [AVSpeechSynthesisProviderVoice 0x600006417520] Name: Tingting, Identifier: com.apple.voice.super-compact.zh-CN.Tingting, Supported Languages ( "zh-CN" ), Age: 0, Gender: 0, Size: 0, Version: (null) VoiceProvider: Could not start synthesis for request SSML Length: 17, Voice: [AVSpeechSynthesisProviderVoice 0x600006417520] Name: Tingting, Identifier: com.apple.voice.super-compact.zh-CN.Tingting, Supported Languages ( "zh-CN" ), Age: 0, Gender: 0, Size: 0, Version: (null), converted from tts request [TTSSpeechRequest 0x600013722040] 能够 language: zh-CN footprint: super-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 Could not instantiate audio unit. Error=Error Domain=NSOSStatusErrorDomain Code=-3000 "(null)" Couldn't find audio unit for request SSML Length: 19, Voice: [AVSpeechSynthesisProviderVoice 0x60000641fac0] 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: 19, Voice: [AVSpeechSynthesisProviderVoice 0x60000641fac0] 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 0x600013730000] able language: en-US footprint: compact rate: 0.500000 pitch: 1.000000 volume: 1.000000 Could not instantiate audio unit. Error=Error Domain=NSOSStatusErrorDomain Code=-3000 "(null)" ... Couldn't find audio unit for request SSML Length: 17, Voice: [AVSpeechSynthesisProviderVoice 0x6000064219f0] Name: Tingting, Identifier: com.apple.voice.super-compact.zh-CN.Tingting, Supported Languages ( "zh-CN" ), Age: 0, Gender: 0, Size: 0, Version: (null) VoiceProvider: Could not start synthesis for request SSML Length: 17, Voice: [AVSpeechSynthesisProviderVoice 0x6000064219f0] Name: Tingting, Identifier: com.apple.voice.super-compact.zh-CN.Tingting, Supported Languages ( "zh-CN" ... ... 1 log/signpost messages lost due to high rates in live mode recording. To guarantee delivery of all logs, set IDELogRedirectionPolicy to oslogToStdio in the environment of the executable. Failed to speak request with error: Error Domain=TTSErrorDomain Code=-4010 "(null)". Attempting to speak again with fallback identifier: com.apple.voice.compact.zh-CN.Tingting Could not instantiate audio unit. Error=Error Domain=NSOSStatusErrorDomain Code=-3000 "(null)" Couldn't find audio unit for request SSML Length: 19, Voice: [AVSpeechSynthesisProviderVoice 0x60000641ec60] Name: Samantha, Identifier: com.apple.voice.compact.en-US.Samantha, Supported Languages ( "en-US" ), Age: 0, Gender: 0, Size: 0, Version: (null) So I moved back to XCODE 14.3.1 simulating on iOS 16.4. The app works fine but I receive these messages: … [AXTTSCommon] MauiVocalizer: 11006 (Can't compile rule): regularExpression=Ne-\Yo, message=unrecognized character follows , characterPosition=4 … [AXTTSCommon] MauiVocalizer: 16038 (Resource load failed): component=ttt/re, uri=rlst/yosemite/set/mnc, contentType=application/x-vocalizer-rettt+text;loader=broker, lhError=88602000 … [catalog] Query for com.apple.MobileAsset.VoiceServices.VoiceResources failed: 2 … [catalog] Query for com.apple.MobileAsset.VoiceServices.VoiceResources failed: 2 … changing items while animating can result in a corrupted navigation bar … … [AXTTSCommon] MauiVocalizer: 11006 (Can't compile rule): regularExpression=Ne-\Yo, message=unrecognized character follows , characterPosition=4 … [AXTTSCommon] MauiVocalizer: 16038 (Resource load failed): component=ttt/re, uri=rlst/yosemite/set/mnc, contentType=application/x-vocalizer-rettt+text;loader=broker, lhError=88602000 … … [AXTTSCommon] MauiVocalizer: 11006 (Can't compile rule): regularExpression=Ne-\Yo, message=unrecognized character follows , characterPosition=4 … [AXTTSCommon] MauiVocalizer: 16038 (Resource load failed): component=ttt/re, uri=rlst/yosemite/set/mnc, contentType=application/x-vocalizer-rettt+text;loader=broker, lhError=88602000 … [catalog] Query for com.apple.MobileAsset.VoiceServices.VoiceResources failed: 2 … … [AXTTSCommon] MauiVocalizer: 11006 (Can't compile rule): regularExpression=Ne-\Yo, message=unrecognized character follows , characterPosition=4 … [AXTTSCommon] MauiVocalizer: 16038 (Resource load failed): component=ttt/re, uri=rlst/yosemite/set/mnc, contentType=application/x-vocalizer-rettt+text;loader=broker, lhError=88602000 Now the app store production version freezes in any device running 17.x.x and not usable anymore. I opened a case with Apple development team but I have not received a reply yet. The zh-CN.Tingting, and en-US.Samantha keep repeating over 350,000 times each in the errors. It also seems that I am receiving: … [catalog] Query for com.apple.MobileAsset.VoiceServices.VoiceResources failed: 2 Without affecting the app in XCODE 14.x. And a similar error: Query for com.apple.MobileAsset.VoiceServicesVocalizerVoice failed: 2 Unable to list voice folder Query for com.apple.MobileAsset.VoiceServices.GryphonVoice failed: 2 Unable to list voice folder In XCODE 15. Any help will be highly appreciated to find a quick work around or a fix. Thanks
Oct ’23