skip to Main Content

I’m using AVSpeechSynthesizer for texts, here’s relevant code.-

guard let nonNilText = text else { return }
let utterance = AVSpeechUtterance(string: nonNilText)
utterance.voice = AVSpeechSynthesisVoice(language: Locale.current.identifier)
utterance.rate = 0.4
synthesizer.speak(utterance)

Everything works fine, but seems that in some devices, particularly when the iPhone locale is set to English, voice over is reproducing what sounds like a description of the utterance itself: something like "Speak: rate xxx, voice name equals to com.apple…" before my text.

I’m guessing this might have to do with some accessibility setting, but can’t figure out where to enable it to reproduce the issue on my iPhone. Any idea?.

2

Answers


  1. Chosen as BEST ANSWER

    What finally worked was just removing the line.-

    utterance.voice = AVSpeechSynthesisVoice(language: Locale.current.identifier)

    to let the synthesizer pick the voice itself.


  2. Goto Accessibility in Settings.

    Tap on VoiceOver

    Tap on Verbosity, toggle off "Speak Hints" option.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search