XCode 14 & iOS 16 Beta: No AVSpeechSynthesisVoice.speechVoices available

I'm testing my App in the Xcode 14 beta (released with WWDC22) on iOS 16, and it seems that AVSpeechSynthesisVoice is not working correctly.

The following code always returns an empty array:

AVSpeechSynthesisVoice.speechVoices()

Additionally, attempting to initialize AVSpeechSynthesisVoice returns nil for all of the following:

AVSpeechSynthesisVoice(language: AVSpeechSynthesisVoice.currentLanguageCode())
AVSpeechSynthesisVoice(language: "en")
AVSpeechSynthesisVoice(language: "en-US")
AVSpeechSynthesisVoice(identifier: AVSpeechSynthesisVoiceIdentifierAlex)
AVSpeechSynthesisVoice.speechVoices().first 
Post not yet marked as solved Up vote post of zabelc Down vote post of zabelc
3.7k views
  • Update: this appears to be an iOS 16 issue. Using the iOS 15.5 simulator, the above code works fine.

  • I have the same problem, did you manage to find a problem? It's indeed a bug with iOS16, but since it's going to be released soon I'm worried my app will just crash after release.

  • I haven't circled back to iOS 16 with my speech app, but I did discover one additional bit of information: I get nasty errors failing to get an AVSpeechSynthesisVoice when my app target is set to "Any iOS Device (arm64)". This happened the other day when I unplugged my physical device then Xcode defaulted back to "Any iOS Device (arm64)", and a SwiftUI canvas preview was trying to run in the background.

Add a Comment

Replies

This problem still occurs in the iOS16 RC. If iOS16 is released as is, many users will encounter crashes.

This problem still occurs in the iOS16 RC.

Did anyone file a bug about this? If so, what was the bug number?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Add a Comment

It seem that the iOS16 not download the speechVoices default,It need user to download speechVoices at Settings - Accessibility - Spoken Content

I reported it there

Thanks. Your bug has landed in the right place but, as per usual, I can’t offer any insight as to when it’ll be fixed.

AFAICT this is the first only that was filed about this, which is a shame because an earlier bug might’ve allowed us to fix this before iOS 16 shipped )-:

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Thanks for reporting! I've just hit this myself. Just updated to XCode14 and running the Simulator, all TTS voices have gone. There doesn't seem to be a way to install voices on the simulator...

Similar thing happened on the upgrade to iOS 13. I filed a bug about that at the time, might be useful...? https://feedbackassistant.apple.com/feedback/7377963

The speechsynthesizer is completely broken on iOS 16, I have made a Ticket FB11401700 on 29th of August. Turn on the adress sanitizer on XCode then you immediatly get a heap buffer overflow when the first Text is spoken and I see now a lot of crashes happening in my App. I hope this gets fixed soon, it‘s really hurting my Business.

And0Austria wrote:

I have made a Ticket FB11401700 on 29th of August.

Are you able to reproduce this on the currently seeded iOS 16.1b1 (20B5045d)?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

  • @eskimo: iOS 16.1b1 (20B5045d) still broken, immediately heap buffer overflow.

Add a Comment

Still broken in iOS 16.0.2 and iOS 16.1 beta 2. @all: Please add tickets in http://feedbackassistant.apple.com and refer to my ticket number FB11401700 to let Apple know that many Apps have this problem.

I experienced the same issue here: https://developer.apple.com/forums/thread/714984 and have filed a bug report 11581086

My app's core functionality depends on this feature, as iOS 16 is rolling out the app will become unusable for users. While we wait for Apple's fix, does anyone know if there is any workaround to this issue?

  • Unfortunately there is no workaround.

Add a Comment

Hope it will be fixed, the same issue with broken TTS on the iOS 16 simulator.

After looking at radiace72's the thread above I believe I've found a work-around: https://developer.apple.com/forums/thread/714984?answerId=732948022#732948022

In Simulator Version 14.0.1 (986.3) with iOS 16.0, you CAN download voices...but it doesn't always work the first time.

When you first create a simulator (here I created an iOS 16 simulator on an iPhone 11), going to Settings > Accessibility > Spoken Content doesn't include an option to download voices, even if you enable Speak Selection and click under Voices: all you see is an empty screen under Voices.

BUT if you kill settings and reopen it, then go back to Spoken Content, enable Speak Selection, click Voices you'll be presented with a list of languages and the ability to download voices below that.

(I created an animated GIF movie of the simulator behavior, but the forum won't let me add it here)

AVSpeechSynthesisVoice works on iPadOS 16 physical device, work on iOS16 simulator, but not work on iOS16.0.3 (require to select in iPhone > Settings > Accessibility > Spoken Content > Voices ; it will override no matter what voice you choose)