How do you enable a microphone input in the android emulator
Asked Answered
B

6

62

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.

Bayadere answered 7/5, 2011 at 21:44 Comment(5)
Neither the Android Market nor the Google Voice Search app are available for the emulator.Peek
Well, you say that but you can actually get the them both installed - so the only thing missing for me now is microphone support - which is what I am asking aboutBayadere
I am simply trying my very hardest to use the emulator to test my speech recognition stuff using the emulator. I am becoming tired of your comments. Nothing I am doing is to encourage piracy, what a ridiculous claim.Bayadere
Why is this question only valid for pirated apps? there are a millions of use cases, where an app needs to use the microphone, not just google voice.Burl
I agree with you renegade! I'm about to test emulator record features and mic is confusing! Who is talking piracy?? I will personally see any software pirate to Valhalla.Unutterable
A
51

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

Atropos answered 16/5, 2011 at 7:16 Comment(1)
@Huynh nice to know you saved time because you read it on SO! :)Atropos
K
60

In 2021 there is an option in emulator settings to enable computer host microphone.enter image description here

Kianakiang answered 26/1, 2021 at 10:57 Comment(2)
This should be the accepted answer for 2021. Works with wearOS emulator too!Uther
My emulator settings (....) button only shows a disabled item - "Extended controls" and nothing else. any ideas?Discretionary
A
51

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

Atropos answered 16/5, 2011 at 7:16 Comment(1)
@Huynh nice to know you saved time because you read it on SO! :)Atropos
B
6

For Mac users:

If none of the other solutions have worked out for you, this may be the issue for you as well.

Just enable Android Studio to get access to the microphone in the macOS privacy settings.

enter image description here

Been searching for a solution for hours, but couldn't find this one anywhere!

Birdella answered 7/12, 2023 at 5:15 Comment(0)
I
5

To On/Off the microphone of emulator, write the command in terminal of android studio.

for On microphone : adb emu avd hostmicon

for Off microphone: adb emu avd hostmicoff

Inoculation answered 2/12, 2020 at 12:17 Comment(0)
S
0

hi try by enabling the audio recording support while creating the virtual device in emulator... While creating device go to hardware part and select new button. A dialog will appear in which select the property combo and select "Audio Recording Support" and give k and apply...

Hope it helps... Let me know the output of it...

Smite answered 12/5, 2011 at 7:31 Comment(2)
Doesnt look like its working - SpeechRecorder app still isnt recording!Bayadere
hi if you are trying in the speech recorder after enabling the audio recording support. Select PCM/16bit/8Khz radio button and it's breaking with other option.Smite
P
0

What version of Android is your Emulator running? I've had similar issues with audio in general when I try to run an Emulator with Android 2.2, which had no sound at all on Windows 7 32-bit. Still haven't been able to fix it, but when I swapped to an Android 2.3 emulator, the sound automatically worked. Maybe you could try this...

Pinder answered 16/5, 2011 at 9:0 Comment(1)
I created a new emulator with Android 2.3. It comes with the ADT.Pinder

© 2022 - 2024 — McMap. All rights reserved.