AVSpeechUtterance with Dutch AVSpeechSynthesisVoice glitches on some words

Posting this here for visibility. Already opened a bug report but maybe this helps other developers.

In our app we use AVSpeechSynthesizer to speak navigation directions. Our Dutch users notice that many of the utterances glitch, where it seems to speak a random '-' in-between the text.

This is reproducible by simply speaking this text on a Dutch AVSpeechSynthesisVoice: "Over 300 meter houd rechts aan richting Breda." (which means "In 300 meters, keep right towards Breda."). It glitches on the word 'aan'.

Reproducible only on-device, as the Xcode simulator doesn't seem to have this issue. Tested on iOS 14.4 and 14.6, where both have this issue. The issue is very obvious to hear.

Texts that also have this issue:

  • "Over 900 meter houd rechts aan en blijf op Muntweg."
  • "Houd rechts aan."

Reproducible on-device with the following code:


// This is Dutch for "In 300 meters, keep right towards Breda."
let reproducableSpeakText = "Over 300 meter houd rechts aan richting Breda."
let speechUtterance = AVSpeechUtterance(string: reproducableSpeakText)

// Configure a Dutch voice
let dutchVoice = AVSpeechSynthesisVoice(language: "nl-NL")
speechUtterance.voice = dutchVoice

// Speak the text
synthesizer.speak(speechUtterance)
  • Could you file a bug through feedback assistant with this info? It'd be helpful if you can include an audio recording of the correct pronunciation vs. the incorrect one (since you say it works in the simulator). A sysdiagnose after the speech has been spoken would be helpful as well.

  • Thanks for your reply! I have added a video recording of the wrong pronunciation issue and a video recording of the right pronunciation from simulator to the FB9144292 issue, if that is also okay instead of an audio recording. Also added a sysdiagnose file that I gathered after reproducing the issue.

Add a Comment

Replies

I experienced the same problem (in english) when words are uppercase.

I filed a bug-report: Mar 9, 2021 at 1:44 PM – FB9036694, which is still open.

Here is a summary of bug report

AVSpeechSynthesizer does not utter correctly some uppercased words

Please describe the issue: Using AVSpeechSynthesizer, I noticed that some words in UPPERCASE are not correctly spoken.

SMALL is pronounced small but WIDTH is pronounced by spelling W-I-D-T-H

  • Version 12.4 (12D4e)
  • MacOS 10.15.7 (19H524)

Please list the steps you took to reproduce the issue: I reproduced the problem in playground:

var sentence = "Hello everyone. WIDTH. Now the width and height." // the sentence to be told"
let synthesizer = AVSpeechSynthesizer()
let utterance = AVSpeechUtterance(string: sentence)
utterance.voice = AVSpeechSynthesisVoice(
  language: "en-GB"
)
utterance.rate = AVSpeechUtteranceDefaultSpeechRate
synthesizer.speak(utterance)

What did you expect to happen? I expect WIDTH to be uttered as width.

What actually happened? WIDTH is spelled W-I-D-T-H

  • solving this generically is very difficult, it's hard to know when something is an acronym (like WHO = World Health Organization vs. the word who). If possible, it's recommended to lowercase these all caps strings for speech purposes.

Add a Comment