2

可能重复:
Android:录音和保存音频

我需要从RecognizerIntent. 现在,我正在做这样的事情:

Intent i = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
i.putExtra(RecognizerIntent.EXTRA_PROMPT, "Speak");
i.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
i.putExtra(RecognizerIntent.EXTRA_LANGUAGE_PREFERENCE, defaultLocale);
i.putExtra(RecognizerIntent.EXTRA_MAX_RESULTS, 1);
i.putExtra(RecognizerIntent.EXTRA_SPEECH_INPUT_COMPLETE_SILENCE_LENGTH_MILLIS, new Long(1000));

我试图创建一个类MediaRecorder来获取音频信号,但它不起作用。我真的需要得到信号。

4

0 回答 0