我使用的是意向语音识别,代码如下:
/**
* Fire an intent to start the voice recognition activity.
*/
private void startVoiceRecognitionActivity()
{
Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,
RecognizerIntent.LANGUA
我们创建了一个Android应用程序,它使用谷歌语音识别器,我们首先选择在程序中使用谷歌语音识别器。大多数设备工作正常,只有少数设备(MEIZU_M5、U78-E、阿波罗Lite等)。在例外情况下报告。好像和Mediatek的语音有冲突吗?我们发现还有一些Mediatek的设备正常工作。这很让人困惑。
java.lang.SecurityException: Not allowed to bind to service Intent { act=android.speech.RecognitionService cmp=com.mediatek.voicecommand/.service.Vo
决定将一个简单的语音写作应用程序连接起来,作为学习语音识别+ F#的测试平台。为了允许语音识别启动或停止,我连接了以下方法:
let Activate () =
sp.RecognizeAsync(RecognizeMode.Multiple)
let Deactivate () =
sp.RecognizeAsyncCancel()
sp.RecognizeAsyncStop()
我可以用默认的语法字典启动引擎。当我称之为停用方法时,问题就来了。我经常得到以下例外:
An unhandled exception of type 'System