5

My Nexus One has it:

  1. Settings includes a "Voice recognizer settings" in the list of "Voice input & output settings".
  2. Google Search has a microphone button next to it, so when I touch it, a dialog prompts me to say what I want to search.

On the emulator (API level 8, Android 2.2) however, any of the above is nowhere to be found.

Isn't voice search part of Android 2.2? If so, why is it found on my Nexus One (Froyo) but not on the emulator?

What do I need to do to make at least the "Voice input & output settings" available?

Update 1: I followed the instructions for creating the recognizer-enabled AVD as suggested below, but I still receive the "Recognizer no present" message:

enter image description here

What else do I need to do?

Is it possible that despite installing Google APIs by Google Inc., Android API 8, revision 2 and creating a special AVD with it, I still need to install the Voice Search app from the Android Market?

Update 2: I followed Michael's correction to install Google's Voice Search app. This solved the "Recognizer no present" problem but now I am presented with a new problem:

enter image description here

The app's suggestion "Speak again" is bogus: Speaking again presents the same error message over and over again.

srf
  • 2,410
  • 4
  • 28
  • 41
  • 1
    There is a lot of plumbing to get right for audio to get from your host's sound card to the emulator. I think it is possible, but I've heard people suggest it isn't worth it and one should just debug audio using a real device. I don't know what problem you are having with the audio. You might look at "Setting Hardware Emulation Options" in http://developer.android.com/guide/developing/devices/managing-avds-cmdline.html or "Emulator Startup Options" in http://developer.android.com/guide/developing/devices/emulator.html – Michael Levy Mar 29 '11 at 14:21
  • @Michael Levy The first thing I did yesterday in my attempts to troubleshoot the problem was setting 'hw.audioInput' to 'yes'. So, I basically implemented what's available for audio in the 2nd link you brought (excellent link BTW, thanks). I will now check the 1st link. – srf Mar 29 '11 at 14:28
  • @Michael Levy Done checking the 1st link as well. It turns out that I researched it to death yesterday as well. See: http://stackoverflow.com/questions/5466992/emulator-exe-help-audio-in-on-windows-produces-unknown-option-help-audio-in This is becoming more and more anigmatic. At this point I am ready to give up and move my debugging to a real device but I would love to see this problem solved for future generations. :) – srf Mar 29 '11 at 14:32
  • It is a worthy goal, but you may just want to move forward. I booted my android emulator this morning for the first time in months. I realized that I did not have Recognizer installed either. When I tested some things months ago, I must have used a real phone and I had no recollection of it. – Michael Levy Mar 29 '11 at 14:44

1 Answers1

4

In your emulator image, can you install Google Voice Search as in Converting speech to text. The app is in the marketplace at https://market.android.com/details?id=com.google.android.voicesearch&feature=search_result. I think this is the only way to add the Recognizer Intent. Recognizer is not part of the base Android, it is considered an additional component that ships with Google Voice Search and is included in some phones.

I thought that including the Google APIs in your emulator target image would work, but it appears that I was mistaken. I thought you needed to build the target to include "Google APIs" since this capability is not core android, but an additional Google feature.

enter image description here

Community
  • 1
  • 1
Michael Levy
  • 13,097
  • 15
  • 66
  • 100
  • @Michael Levy No, I didn't include the Google libraries. How do I do that? – srf Mar 28 '11 at 20:30
  • 1
    Edited to answer your comment. I think this is right. I haven't done it in a few months. – Michael Levy Mar 28 '11 at 20:40
  • @Michael Levy Thank you very much. Interestingly, I don't have Google APIs available in the "Target" drop-down list. I think I need to install it first via 'Available packages' => Google Inc. (dl-ssl.google.com) => Google APIs by Google Inc., Android API 8, revision 2, right? – srf Mar 28 '11 at 21:28
  • Right. Installing Google APIs by Google Inc., Android API 8, revision 2 allowed the creation of an AVD as described above. I will report back how actual running of the sample VoiceRecognition app runs on the emulator. – srf Mar 28 '11 at 21:43
  • 1
    @Michael Levy This is strange - I created the AVD exactly as in the snapshot you provided, and I still receive the "Recognizer not present" message (see snapshot in update above). Why? – srf Mar 28 '11 at 22:00
  • 1
    Sorry, I was mistaken about the Google APIs. Can you try to add the Voice Search to your emulator image? – Michael Levy Mar 29 '11 at 13:31
  • @Michael Levy Thank you again. This solved the "Recognizer no present" problem but now I am presented with a new problem (see update in my original posting). It may be related to another problem I described here: http://stackoverflow.com/questions/5472370/why-is-it-impossible-to-use-the-speech-recorder-on-the-android-emulator – srf Mar 29 '11 at 14:04
  • Accepting, because the answer did get rid of the "Recognizer not present" message, despite still not being able to use it. – srf Mar 29 '11 at 18:05