ios - determining user's preferred AVSpeechSynthesisVoice for a given language -
my ios app provides avspeechsynthesizer
support in multiple languages (not device's current language).
in settings->general->accessibility->speech->voices->spanish
, user can set preferred voice either "spanish (spain)" or "spanish (mexico)" (which correspond es-es , es-mx, respectively).
portuguese (pt-pt, pt-br), french (fr-fr, fr-ca), etc.
if 1 of users wants have app speak spanish phrase, how can determine of available spanish voices user has selected in settings?
i tested [avspeechsynthesisvoice speechvoices]
see whether ordering of voices changes when user preferences changes, answer appeared no. [avspeechsynthesisvoice voicewithlanguage:]
requires full language-locale string, passing in "es" gets nil though 2 spanish voices available default.
i scanned through keys in [nsuserdefaults standarduserdefaults]
, there's nothing relevant there. , i've looked through uiaccessibility
documentation without finding need.
Comments
Post a Comment