我正在尝试实现speech recognition
.我不断收到错误:
ERROR_NO_MATCH - No recognition result matched - 7
我找不到任何解释这意味着什么的东西。"No recognition result matched"
是什么意思?
您需要先启用部分结果,然后调用UNSTABLE_TEXT
// When creating the intent, set the partial flag to true
intent.putExtra(RecognizerIntent.EXTRA_PARTIAL_RESULTS,true);
使用 onPartialResults(( 中返回的 partialResults。在返回的捆绑包中,"SpeechRecognizer.RESULTS_RECOGNITION"具有所有项减去最后一个项,"android.speech.extra.UNSTABLE_TEXT"具有最后一个缺失的已识别项。
@Override
public void onPartialResults(Bundle partialResults) {
ArrayList<String> data =
partialResults.getStringArrayList(SpeechRecognizer.RESULTS_RECOGNITION);
ArrayList<String> unstableData =
partialResults.getStringArrayList("android.speech.extra.UNSTABLE_TEXT");
mResult = data.get(0) + unstableData.get(0);
}
您可以点击以下链接以更好地理解 -
语音识别
没有匹配的识别结果。这意味着超级盒s3不能我们语音命令消息没有匹配的识别结果。出现在屏幕上