Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/212.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android离线语音识别只显示一个结果?_Android_Speech Recognition_Offline - Fatal编程技术网

Android离线语音识别只显示一个结果?

Android离线语音识别只显示一个结果?,android,speech-recognition,offline,Android,Speech Recognition,Offline,我已经设置了一个语音识别服务,如本文所示,当我使用离线识别(将手机置于平面模式)时,它在onResults()中只显示1个结果,而在在线模式下,我总是得到5个以上的结果 我使用这个意图: mSpeechRecognizerIntent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH); mSpeechRecognizerIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,

我已经设置了一个语音识别服务,如本文所示,当我使用离线识别(将手机置于平面模式)时,它在onResults()中只显示1个结果,而在在线模式下,我总是得到5个以上的结果

我使用这个意图:

mSpeechRecognizerIntent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
    mSpeechRecognizerIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,
                                     RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
    mSpeechRecognizerIntent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE,
                                     this.getPackageName());
    mSpeechRecognizerIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, "fr-FR");
    mSpeechRecognizerIntent.putExtra(RecognizerIntent.EXTRA_MAX_RESULTS, 10);
我改学英语,它也这么做了。我还尝试了网络搜索而不是自由形式

我想知道是否有一些神奇的代码,使其工作,或者如果它只是不可能结合离线识别多个结果

先谢谢你