Voice recognition in Android emulator

Quickly share your Android Code Snippets here...

Voice recognition in Android emulator

Postby zzzzz75 » Mon Dec 21, 2009 4:20 pm

hi all
i am very new to android programming. i tried running the voice recognition demo app and at this point in the code

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.       // Check to see if a recognition activity is present
  2.  
  3.         PackageManager pm = getPackageManager();
  4.  
  5.         List<ResolveInfo> activities = pm.queryIntentActivities(
  6.  
  7.                 new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH), 0);
  8.  
  9.         if (activities.size() != 0) {
  10.  
  11.             speakButton.setOnClickListener(this);
  12.  
  13.         } else {
  14.  
  15.             speakButton.setEnabled(false);
  16.  
  17.             speakButton.setText("Recognizer not present");
  18.  
  19.         }
Parsed in 0.031 seconds, using GeSHi 1.0.8.4


I am always getting the following: "Recognizer not present"

i used the SDK to create the targets and am using the emulator on platform "android-2.0.1" (on windows)

any help would be great

thanks in advance
Last edited by zzzzz75 on Tue Dec 22, 2009 7:22 am, edited 1 time in total.
zzzzz75
Junior Developer
Junior Developer
 
Posts: 11
Joined: Mon Dec 21, 2009 12:08 pm

Top

update

Postby zzzzz75 » Tue Dec 22, 2009 6:50 am

hi
i would like to update this post
i've downloaded the android dev phone (signed-dream_devphone_userdebug-img-14721.zip) - downloaded from http://www.google.com/url?sa=D&q=http:/ ... a7Ezs9XB2A

i now seem to get 1 activity for voice recognition which is great - but am getting an 'audio problem' when running the demo app

any help would be greatly appreciated

thanks
zzzzz75
Junior Developer
Junior Developer
 
Posts: 11
Joined: Mon Dec 21, 2009 12:08 pm

Top

Return to Code Snippets for Android

Who is online

Users browsing this forum: No registered users and 3 guests