0

how I can set pronunciation for 1 word in AVSpeechUtterance? for example - read [ri:d], read [red], read [red] spelled the same but pronounced differently

AVSpeechUtterance(string: "read") // in second form, how?
iGatiTech
  • 2,306
  • 1
  • 21
  • 45
EvGeniy Ilyin
  • 1,817
  • 1
  • 21
  • 38

1 Answers1

5

You can use an attributed string with International Phonetic Alphabet pronunciation attached by way of the AVSpeechSynthesisIPANotationAttribute key.

matt
  • 515,959
  • 87
  • 875
  • 1,141
  • See https://developer.apple.com/documentation/avfoundation/avspeechutterance/1648776-init – matt Dec 18 '19 at 02:48
  • https://a11y-guidelines.orange.com/mobile_EN/dev-ios.html#speech-synthesis is also a good source of information with code snippets and illustrations. – XLE_22 Dec 18 '19 at 08:01