1

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?

timbre timbre
  • 12,648
  • 10
  • 46
  • 77
  • 4
    If you've found a bug, please report it to Apple. – matt Dec 30 '21 at 21:48
  • 1
    I have the same issue. `didFinish` is call on .stopSpeaking(. It's really annoying as it messes my mechanic that move from one section to the next – tolbard Jan 02 '22 at 06:38
  • @tolbard Thank you for your feedback. I've reported to Apple 3 days ago but have not received feedback yet. Meanwhile I coded a workaround such that if iOS>= 15 then a different section of code is run and a flag tells me if the user stopped the utterance manually; it's working fine but I will have to revert to the original code if/when Apple corrects this bug. – Bernardo Henriques Jan 03 '22 at 11:15

0 Answers0