Quantcast
Channel: Active questions tagged crash - Stack Overflow
Viewing all articles
Browse latest Browse all 7188

iOS Swift - Text to Speech make the app crash

$
0
0

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 :

Error : Thread 1 : EXC_BAD_ACCESS (code:1, address: 0x0)

And in console: (lldb)

Does anyone has an idea of how to fix this ?Thanks, Alex


Viewing all articles
Browse latest Browse all 7188

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>