gre*_*egm 1 android speech-recognition
如何正确地参数化语音识别器,以便它可以更容易地识别用户可能会说的单词?
据我所知,没有办法.
我相信这个网站是错误的:http://www.4feets.com/2009/04/speech-recognition-in-android-sdk-15/
根据该站点,此代码:ArrayList <String> potentialResults = new ArrayList <String>();
potentialResults.add( "黄色");
potentialResults.add( "绿色");
potentialResults.add( "蓝");
potentialResults.add( "红");
// Create Intent
Intent intent = new Intent("android.speech.action.RECOGNIZE_SPEECH");
Run Code Online (Sandbox Code Playgroud)
会给识别器提示你可能会说出那些话.然而,它似乎绝对没有.它还与google文档冲突说:
"执行ACTION_RECOGNIZE_SPEECH时可能产生的ArrayList.仅在返回RESULT_OK时出现." 这暗示数组是返回值而不是输入.
要测试这个,请尝试添加:ArrayList <String> potentialResults = new ArrayList <String>();
potentialResults.add( "小茴香"); 并尝试让语音识别器识别它.你会发现它很难.
有没有人深入了解如何正确控制语音识别器?
| 归档时间: |
|
| 查看次数: |
4495 次 |
| 最近记录: |