Google speech recognizer for Traditional Chinese text

326 views Asked by At

I want to output the speech to traditional chinese but it output to simplify chinese instead. My codes:

Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,
            RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, "zh-TW");

I also tried to set EXTRA_LANGUAGE to "zh_TW", "TW" and Locale.TAIWAN but it doesn't work too.

In my Android 7.0 settings "Traditional Chinese"(繁體中文) is added in Language preferences. I able to select it in keyboard & type it.

Is this a bug of google speech recognizer?

1

There are 1 answers

0
len On BEST ANSWER

Finally I found the solution, need to use cmn-Hant-TW for EXTRA_LANGUAGE. Google documentation is sucks.