AVSpeechSynthesizer.stopSpeakingAtBoundary causes lockup

We have an app where a user can trigger a call to cancel an ongoing utterance. They might press a hardware button rapidly in succession which indirectly calls this method and puts AVSpeechSynthesizer in a weird state where it locks up. I don't detect any exceptions, and I can call speakUtterance() with no effect, but I'll see no delegate callbacks.


Any ideas on how we can "wake it up" again? I don't see a "paused" notification either. Switching to either an immediate or word boundary has no effect on the bug.

I think the resolution was we were reusing the AVSpeechSynthesizer after stopSpeakingAtBoundary() was called. I'm guessing the "stop" also means the synthesizer isn't a reliable instance any more. Looks like reuse has worked in some cases.

I have the same problem. This issue occurs frequently on iOS 17.5.1 . any body know why? or a way to walk around?

AVSpeechSynthesizer.stopSpeakingAtBoundary causes lockup
 
 
Q