在android中获取语音识别的结果

时间:2011-03-28 08:59:18

标签: android

我想获得服务语音识别的结果。我的意思是我想获得用户说的内容。我尝试了一个代码

ArrayList<String> matches = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);
if(matches.get(i).equals("funky monkey")){
Toast.makeText(this,"Excelent !",2000).show();

但我不理解这一行if(matches.get(i).equals(“funky monkey”)) 你能帮助我理解这一行吗或通过其他解决方案帮助我 thx

1 个答案:

答案 0 :(得分:0)

此行检查位于matchesmatches.get(i))中第i个位置的字符串是否与字符串“funky monky”(equals("funky monky")

相同