I have an app with Text To Speech feature when clicking on a button. My code worked fine until it made the app crash. I think this bug must be related to the new release of iOS 9.3.3 but I can't find anything on the net that's why I'm posting here.
Here is the function triggered by a button:
func textToSpeech(){ let textSynthesizer = AVSpeechSynthesizer() let utterance = AVSpeechUtterance(string: self.targetLanguage) utterance.voice = AVSpeechSynthesisVoice(language: self.languageFlag) textSynthesizer.speakUtterance(utterance)}
When I click on the button I get this error on the AVSpeechSynthesizer initialisation :
And in console: (lldb)
Does anyone has an idea of how to fix this ?Thanks, Alex