Post

Replies

Boosts

Views

Activity

Reply to AVFoundation AVSpeechUtterance AVSpeechSynthesizer not working in iOS 16 Beta 4, Beta 5
Yeah, I am also experiencing the same issue. Even with current beta 6 it is not working. I am seeing some exception in the logs: [catalog] Unable to list voice folder. The required voices are present in the iPhone and working properly in Voice Over and Spoken content. Even the voice API AVSpeechSynthesisVoice.speechVoices() is fetching all the voices, but I am getting above exception at line synthesizer.speak(utterance). Exact same code is working fine in iOS 15 and lower. It would be helpful if any solution is shared.
Topic: Machine Learning & AI SubTopic: General Tags:
Aug ’22
Reply to AVFoundation AVSpeechUtterance AVSpeechSynthesizer not working in iOS 16 Beta 4, Beta 5
Hi @TheMichael, Check this class TTS { let synth = AVSpeechSynthesizer() func speak() { let utterance = AVSpeechUtterance(string: "Hello World") utterance.voice = AVSpeechSynthesisVoice(language: "en-US") synth.speak(utterance) } }
Topic: Machine Learning & AI SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’22
Reply to AVFoundation AVSpeechUtterance AVSpeechSynthesizer not working in iOS 16 Beta 4, Beta 5
I solved it by declaring the AVSpeechSynthesizer as an instance variable instead of a local variable as above. As soon as an AVSpeechSynthesizer goes out of scope and is deallocated, speech output is stopped. Can you try instead storing the synthesizer as an instance or state variable?
Topic: Machine Learning & AI SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’22
Reply to AVFoundation AVSpeechUtterance AVSpeechSynthesizer not working in iOS 16 Beta 4, Beta 5
Yeah, I am also experiencing the same issue. Even with current beta 6 it is not working. I am seeing some exception in the logs: [catalog] Unable to list voice folder. The required voices are present in the iPhone and working properly in Voice Over and Spoken content. Even the voice API AVSpeechSynthesisVoice.speechVoices() is fetching all the voices, but I am getting above exception at line synthesizer.speak(utterance). Exact same code is working fine in iOS 15 and lower. It would be helpful if any solution is shared.
Topic: Machine Learning & AI SubTopic: General Tags:
Replies
Boosts
Views
Activity
Aug ’22