0

After integrating voice over through accessibilityLabels, and testing the interaction alone, it was time to try turning on the voice. Fortunately, it worked perfectly well for english text... But wasn't so lucky with Arabic.

Apparently, voice over utters "unpronounceable" when it reaches Easten Arabic-Indic numerals:

١ ، ٢ ، ٣

It is really inefficient to keep listening to each accessibility label to make sure, so I thought there would be some sort of query we can do to the TTS engine, and write tests around that.

All I know after research is that the underlying TTS engine is AVSpeechSynthesis, but that doesn't seem to have anything of that sort.

Mazyod
  • 22,319
  • 10
  • 92
  • 157
  • Is VoiceOver able to pronounce those numerals if you change the system language of the device? It feels weird that one would have to work around such a thing. – David Rönnqvist Nov 09 '15 at 08:33
  • @DavidRönnqvist yes, as mentioned it worked perfectly for english. I ended up just regexing the sh*t out of it, then using NSNumberFormatter with spell out style. – Mazyod Nov 09 '15 at 15:49
  • @DavidRönnqvist Also, interestingly, my code is in Swift, and in the regex code I had to use `string.utf16.count`, since `utf8` yields wrong results. [I am sure these numerals are part of utf8](http://www.fileformat.info/info/charset/UTF-8/list.htm?start=1024), but maybe there is some weird hidden character attached to them. Ultimately, the question is about unit testing :) – Mazyod Nov 09 '15 at 19:13

0 Answers0