【发布时间】:2016-04-30 12:16:18
【问题描述】:
我是 Android 的初学者。在我的程序中,如果未检测到语音,语音识别器 Intent 不会关闭。请找到以下代码:
Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,
RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
intent.putExtra(RecognizerIntent.EXTRA_PROMPT, "Please respond...");
intent.putExtra(RecognizerIntent.EXTRA_MAX_RESULTS, 100);
startActivityForResult(intent, SPEECH_REQUEST_CODE);
请发送您的宝贵建议以关闭 Google 语音识别器提示。 提前致谢。
【问题讨论】:
-
你找到什么了吗?
标签: android android-intent google-speech-api