语音识别器不适用于其他语言的android

时间:2017-07-09 17:40:20

标签: locale speech-recognition speech-to-text

我正致力于语音识别,这种语言识别仅适用于英语和印地语,但如果我正在使用其他语言,例如bengali和urdu等,那么它就无效了。我写的代码。

区域设置可能是" ur"为urdu和" bn为bengali"

recognizerIntent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);

recognizerIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);

recognizerIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE,locale);

recognizerIntent.putExtra(RecognizerIntent.EXTRA_PARTIAL_RESULTS,true);

recognizerIntent.putExtra(RecognizerIntent.EXTRA_SPEECH_INPUT_MINIMUM_LENGTH_MILLIS,1000);

recognizerIntent.putExtra(RecognizerIntent.EXTRA_MAX_RESULTS,1);

recognizerIntent.putExtra(" android.speech.extra.DICTATION_MODE",true);

0 个答案:

没有答案
相关问题