'Google speech recognizer for Traditional Chinese text
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?
Solution 1:[1]
Finally I found the solution, need to use cmn-Hant-TW for EXTRA_LANGUAGE. Google documentation is sucks.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | len |