简体   繁体   中英

AVSpeechSynthesisVoice crashing in iOS 16 beta

On iOS 16 beta, the following code is crashing:

AVSpeechSynthesisVoice(language: "en-US")!

with the following error code:

Fatal error: Unexpectedly found nil while unwrapping an Optional value

It worked fine before and I'm not seeing any API change.

Does anyone know what could be going on?

It seems like Apple missed to add voice libraries to iOS 16 betas. Below code returns nil.

AVSpeechSynthesisVoice.speechVoices()

Which should return the list of available voices. I filed a bug, you should also.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM