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

Popular posts from this blog

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -