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
-
—
zabelc
Add a CommentUpdate: this appears to be an iOS 16 issue. Using the iOS 15.5 simulator, the above code works fine.