android - Text to Speech Locale Hindi Indian -


i've created text speech engine android supports many languages, 1 of hindi.

in android text speech settings, when user selects default locale, android number of checks including sending intent action_get_sample_text

here list of supported locales:

private static final string[] supported_languages = { "eng-gbr", "eng-usa", "fra-fra", "spa-esp", "deu-deu", "ita-ita",         "kor-kor", "nld-nld", "dan-dnk", "fin-fin", "jpn-jpn", "nor-nor", "pol-pol", "por-prt", "por-bra", "rus-rus",         "swe-swe", "zho-chn", "zho-hkg", "zho-twn", "ara-sau", "hi-in", "ces-cze", "ell-grc", "hun-hun", "ron-rou",         "slk-svk", "tha-tha", "tur-tur", "cym-gbr", "isl-isl", "in-idn" }; 

for every locale other "hi-in", android sends intent , respond example text , "listen example" button becomes available.

i'm returning lang_country_available call onislanguageavailable, buttons remain greyed out , states language not supported.

i've tried many different iso combinations of locale:

hin-in, hi-ind, ind-hi etc etc etc, android doesn't send intent, despite being labelled correctly in locale list hindi(indian) or hindi.

there no errors in logcat suggest failed variant match.

there's little point me posting code, android doesn't send intent locale, doesn't reach code....

any ideas how correctly handle locale variant?

edit: i've realised it's happening indonesian (in-idn)

tts uses 3-letter codes* language , locale. so, based on language/country code for:

hindi         hin-ind indonesian    ind-idn 

hope helps.


*this needs proper citation sources: made conclusion based on existing tts engine implementations.


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -