1
一般我們可以通過這個意圖識別語音:如何實現多語言語音識別OK,谷歌風格
Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, locale.toString());
try {
startActivityForResult(intent, RESULT_SPEECH);
} catch (ActivityNotFoundException a) {}
但我想實現與OK-谷歌式的呼叫,當你不需要定義要識別的語言。