AVSpeechSynthesizer occasionally doesn't speak

I've written an exercise application that uses AVSpeechSynthesizer to produce audio countdowns during user workouts: "5" "4" "3" "2" "1" "GO", where each individual digit utterance is spoken one second apart from the previous one. These countdowns are played anywhere between 30 seconds to 30 minutes apart from one another. Additionally, to allow users to play music during their workouts, the entirety of each countdown is performed with the "duckOthers" session category being active.

Here is the sequence of events:

  1. set "duckOthers" session category, wait 1 second
  2. speak "5", wait 1 second
  3. speak "4", wait 1 second
  4. speak "3", wait 1 second
  5. speak "2", wait 1 second
  6. speak "1", wait 1 second
  7. speak "GO", wait 1 second
  8. set "mixWithOthers" session category

For the majority of the time, each countdown is performed correctly, each digit is spoken one second apart. Occasionally though, either the "5" digit or "1" digit is not spoken, but the other digits of the countdown are, at their correct times. Using the "speechSynthesizer:didStart" and "speechSynthesizer:didFinish" functions, I can see that a spoken "1" takes 0.5 seconds to perform, and an unspoken "1" takes 0.1 seconds or less.

So my questions are:

  • Why is AVSpeechSynthesizer failing to speak an utterance?
  • Can I do anything to prevent this from happening?

FYI, I'm currently running my application on an iPhone 17 Pro running iOS 26.5.1, but the problem has occurred on older iOS versions too.

Thanks in advance.

AVSpeechSynthesizer occasionally doesn't speak
 
 
Q