iOS 15.2 bug on didFinish utterance callback

274 views Asked by At

On iOS 15.2, the callback function func speechSynthesizer(_ synthesizer: AVSpeechSynthesizer, didFinish utterance: AVSpeechUtterance) is called rightly when an audio utterance completes and ends BUT it is also called (wrongly) when an audio utterance is stopped with synthesizer.stopSpeaking(at: .immediate).

I confirmed this wrong behaviour compiling and simulating on Xcode 13.2.1: on all text-to-speech audio utterances stopped with synthesizer.stopSpeaking(at: .immediate), the didFinish utterance callback function is wrongly called and shows up on the Xcode console.

On iOS 12, 13 and 14 this works fine: the stopping of an audio utterance does not call the didFinish utterance callback function.

Anyone as seen this behaviour on iOS 15?

0

There are 0 answers