【发布时间】:2012-12-05 12:39:41
【问题描述】:
我直接使用SpeechRecognizer,我已经实现了自定义RecognitionListener。语音识别在 jelly bean 以外的 android 上运行良好。果冻豆识别器无法检测到语音结束。
我的代码如下
speechRecognizer = SpeechRecognizer.createSpeechRecognizer(getApplicationContext());
speechRecognizer.setRecognitionListener(new CustomListener());
Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,
RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
intent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE,
"com.somemodule");
intent.putExtra(RecognizerIntent.EXTRA_MAX_RESULTS, 5);
speechRecognizer.startListening(intent);
我错过了什么? 我发现还有一个人报告了这个问题here ,但没有人提供解决方案
【问题讨论】:
标签: android speech-recognition android-4.2-jelly-bean