Java – How to enable a microphone input in the android emulator

adbandroidjavamicrophonespeech-recognition

I have been on a rough ride trying to do something using the Speech recognition on an android emulator.

Having finally installed the market place and the Google Voice Search app – I am so close to enabling my emulator to do what I want – recognize my speech. First I need to enable the emulator to record audio , or at least think that a microphone is present.

I believe adb used to have the -mic option – however I dont think it exists anymore.

Has anyone done this or can anyone shed some light on it.

Best Answer

have you seen this tutorial? see the comment:

You guys are not able to record sound in emulator because the android emulator doesn’t support it yet. This code should only work on the phone.

Update

Now it is possible to record audio by android emulators, just need to enable it:

Extended controls (3 dots in emulator control bar) > Microphone > Virtual microphone uses host audio input