May 01 AT 12:22 PM Alex Byrnes 31 Comments

Cupcake Voice Recognition Now Available for Testing

Since my last article on voice recognition in Cupcake, two things have happened. The Haykuro images came out and Google released the 1.5 SDK. That means it’s time to test out the voice recognition on a real phone. I’ve compiled some example code that comes with the SDK below. You can install it if you have the Cupcake over-the-air update, the 1.5 ADP, or a Haykuro image.

Voice Recognition for Android 1.5

Voice Recognition for Android 1.5

To install, look for Voice Recognition in the Market (Applications > Demo) or scan the QR code at the bottom of the post. Once it’s installed, you just push the button, speak into your phone and Google’s best guess appears on the screen. Very simple, but some pressing questions have been answered.

It looks like voice recognition will take this form for all applications. The application starts the voice recognizer which prompts the user, displays the volume widget, shows the waveform of the recording, and then returns the results to the application. It’s not perfectly seamless but it gets the job done in a fairly small amount of time.

Note that the processing is not CPU intensive on the phone, but it will need to be sent to Google to be turned into text (thanks to Tim H for pointing this out on the last article). You’ll need a good internet connection for this. I found EDGE (non-3G data connection) to be a bit unreliable. About half got sent back with a connection error. That will definitely vary, but the worst case scenario is not good, especially if you’re trying to use this for possibly frustrating operations like speaking commands to your GPS navigation system. WiFi works much better and the results are fast.

Voice Recognition Results

Voice Recognition Results

I like the fact that you get good feedback from the volume widget and the waveform as to how you should be speaking. Since it doesn’t adapt itself to your speaking patterns, you’ll have to accommodate it. Also, if you don’t have an American accent, you might have a tough time getting good results. But, it does work, and Google says it’s getting better with practice. And since Google is one of the few companies on Earth with billions of dollars and access to millions of people’s voice searches, I’d say they’ve got as good a chance as anyone of getting this right.

Internally, the voice recognition interface is pretty simple. Developers will get their choice of models, either free-form or web search based, and they get a list of possible results instead of just one. That allows them to implement their own language model. If three responses come back, the application can choose the one most fitting to its cause.

Suppose the application wants a simple “yes” or “no.” It could accept anything starting with a “Y” as yes and “N” as no. “Yup,” “Yeah,” “You betcha”… as well as “yurt,” “yam”, and “yaw” depending on who’s speaking and how Google interprets it. You’re almost guaranteed a good match. In fact, the smaller the search space, the greater the likelihood of a good match, so a yes/no could be simplified to a silence versus response scheme that would work in any language. (In my tests, “yes” worked pretty well, but “no” consistently came up with “snow.”)

The language model is set to free-form on the sample, so results should differ slightly from the regular voice search.

Good luck! If you have funny, interesting, insightful results, please post them here.

Voice Recognition Demo for Android
Version: 1.0
Developed By: Alex Byrnes
Price: FREE
Filesize: 0.11KB
Author info coming soon...

    Most Tweeted This Week

  • Pingback: Speech Recognition in Android SDK 1.5 | Four Feet Software()

  • http://androidandme.com Taylor

    I just downloaded it and played around for awhile. It will be cool once more apps start supporting this. I can’t wait to see how it is used for games.

    • http://Website sudheendra

      how do i download this ? there is no download link available here.

  • http://gynecologistcobra.tumblr.com Demi Adejuyigbe

    Oh man. This actually works pretty well. Thanks for the article, I probably would’ve missed this otherwise.

  • Gammax

    something the ocean cant do, I cant wait for my g1

  • Rey

    Pretty cool !

  • Mario

    Hmm… doesn’t work on mine. UK Cupcake OTA updated, but might need a hard reset one of these days.

  • marc

    same here dutch g1 1.5 doesnt have the voice search(not on mine) so i guess thats why it doesnt work. weird that the us does have the voice search and mine doesnt.

  • cece

    In the french version neither. No api on the phone.that’s because for now only english is supported.

  • Bryce

    Can this be tested on the emulator?

    • http://androidandme.com Alex Byrnes

      No unfortunately not. The current emulator doesn’t have voice recognition.

  • Bryce

    So is English the only language that is supported right now?

    • http://androidandme.com Alex Byrnes

      Yes English is the only supported language and I don’t think it’s being rolled out in the UK even though that would be an obvious next step. Handling different accents appears to be a big hurdle.

  • Yi Zhang

    Hi Alex,
    As I searched in the SDK document of Cupcake, I only found several constants of android.speech. And as well I only found a built-in app VoiceDialer that uses android.speech. It seems that Google did not expose APIs for external developers. So how do you know the interfaces of android.speech and develop this app?

    Thanks,
    Yi

  • Sam

    Actually according to the guys at 4feets.com you can narrow the results to specific answers. So if your app is waiting for a yes/no as a result (and you want to avoid “snow”) then the code would look like this:

    # public void startRecognition() {
    # // Set potential Results
    # ArrayList potentialResults = new ArrayList();
    # potentialResults.add(“yes”);
    # potentialResults.add(“no”);

    # // Create Intent
    # Intent intent = new Intent(“android.speech.action.RECOGNIZE_SPEECH”);
    #
    # // Settings
    # intent.putExtra(“android.speech.extra.LANGUAGE_MODEL”, “free_form”);
    # intent.putExtra(“android.speech.extra.PROMPT”, “Speak now”);
    # intent.putExtra(“android.speech.extra.RESULTS”, potentialResults);

  • Ariel

    I downloaded it and installed it today. I’m using a G2 carried by Rogers in Montreal, Canada. When I open the app, it says: “This activity demonstrates the voice recognition APIs.” and under that: “Recognizer not present.”

    What do I need to do for it to work?
    This phone came with the 1.5 version stock… Do I need to update anything?

    • http://www.wikispeedia.org jim

      I too see “recognizer not present”.

      I am running voicerecognizer.java
      from
      developer.android.com/

      Why does it say “recognizer not present”. I guess I will have to single step thru it, ugh.

      Cheers!
      speedup@wikispeedia.org
      jim

  • Jim

    Could you make it copy the text to the clipboard for later pasting?

  • SDC

    This tool doesn’t work in Canada for whatever, clearly inane, reason!

    You will get the ‘recognizer not present’ error if you try to use it.

    Can anyone explain why the recognizer is not available on Canadian phones?

  • matt wolfe

    also wondering why there is no voice recognicion in canada…first no toutchscreen keyboard and now no voice recognition. not to mention crummy service…man rogers blowz!

  • riccio

    why can’t I download the file??

  • Pingback: Symbian Blog()

  • http://Website Bodhi

    G2 in the UK “recognizer not present”. : (

  • http://Website TATIF

    est ce que je peut le tester dans mon pc avant de tester dans le téléphone
    merci

  • abdelatif

    je suis entrain de realiser une application pour programmer un clavier vocale (au lieu de tapper une lettre par exemple “A”, l’utilisateur va la dicter directement puis l’application doit reconnaitre la lettre ” A” puis elle sera afficher a l’ecran du smartphone ) = pour faciliter la saisie des sms; j’aimerai bien que je trouve un aide sur les api de reconnaissance et synthese voclae pour android.
    la deuxieme chose est : est ce que l’emulateur d’android prend en charge les applications de reconnaissance et synthese vocale;

    • abdelatif

      je suis entrain de realiser une application pour programmer un clavier vocale (au lieu de tapper une lettre par exemple “A”, l’utilisateur va la dicter directement puis l’application doit reconnaitre la lettre ” A” puis elle sera afficher a l’ecran du smartphone ) = pour faciliter la saisie des sms; j’aimerai bien que je trouve un aide sur les api de reconnaissance et synthese voclae pour android.
      la deuxieme chose est : est ce que l’emulateur d’android prend en charge les applications de reconnaissance et synthese vocale;

  • http://Website sudheendra

    how do i download this ? there is no download link available here.

  • Pingback: Voice Recognizer Demo | Android Apps()

  • Pingback: Voice Recognizer Demo | Best Android()

  • Pingback: Voice Recognizer Demo « Android Apps review()

  • http://Website me

    how the hek do you dl it ?
    must u be logged or what

  1. Speech Recognition in Android SDK 1.5 | Four Feet SoftwareGuest 6 years ago

    [...] The guys at androidandme have published an app and an article evaluating the speech recognition feature. The voice is first recorded and [...]

  2. TaylorGuest 6 years ago

    I just downloaded it and played around for awhile. It will be cool once more apps start supporting this. I can’t wait to see how it is used for games.

  3. Demi AdejuyigbeGuest 6 years ago

    Oh man. This actually works pretty well. Thanks for the article, I probably would’ve missed this otherwise.

  4. GammaxGuest 6 years ago

    something the ocean cant do, I cant wait for my g1

  5. ReyGuest 6 years ago

    Pretty cool !

  6. MarioGuest 6 years ago

    Hmm… doesn’t work on mine. UK Cupcake OTA updated, but might need a hard reset one of these days.

  7. marcGuest 6 years ago

    same here dutch g1 1.5 doesnt have the voice search(not on mine) so i guess thats why it doesnt work. weird that the us does have the voice search and mine doesnt.

  8. ceceGuest 6 years ago

    In the french version neither. No api on the phone.that’s because for now only english is supported.

  9. BryceGuest 6 years ago

    Can this be tested on the emulator?

  10. BryceGuest 6 years ago

    So is English the only language that is supported right now?

    • Yes English is the only supported language and I don’t think it’s being rolled out in the UK even though that would be an obvious next step. Handling different accents appears to be a big hurdle.

  11. Yi ZhangGuest 6 years ago

    Hi Alex,
    As I searched in the SDK document of Cupcake, I only found several constants of android.speech. And as well I only found a built-in app VoiceDialer that uses android.speech. It seems that Google did not expose APIs for external developers. So how do you know the interfaces of android.speech and develop this app?

    Thanks,
    Yi

  12. SamGuest 6 years ago

    Actually according to the guys at 4feets.com you can narrow the results to specific answers. So if your app is waiting for a yes/no as a result (and you want to avoid “snow”) then the code would look like this:

    # public void startRecognition() {
    # // Set potential Results
    # ArrayList potentialResults = new ArrayList();
    # potentialResults.add(“yes”);
    # potentialResults.add(“no”);

    # // Create Intent
    # Intent intent = new Intent(“android.speech.action.RECOGNIZE_SPEECH”);
    #
    # // Settings
    # intent.putExtra(“android.speech.extra.LANGUAGE_MODEL”, “free_form”);
    # intent.putExtra(“android.speech.extra.PROMPT”, “Speak now”);
    # intent.putExtra(“android.speech.extra.RESULTS”, potentialResults);

  13. ArielGuest 6 years ago

    I downloaded it and installed it today. I’m using a G2 carried by Rogers in Montreal, Canada. When I open the app, it says: “This activity demonstrates the voice recognition APIs.” and under that: “Recognizer not present.”

    What do I need to do for it to work?
    This phone came with the 1.5 version stock… Do I need to update anything?

    • jimGuest 5 years ago

      I too see “recognizer not present”.

      I am running voicerecognizer.java
      from
      developer.android.com/

      Why does it say “recognizer not present”. I guess I will have to single step thru it, ugh.

      Cheers!
      speedup@wikispeedia.org
      jim

  14. JimGuest 6 years ago

    Could you make it copy the text to the clipboard for later pasting?

  15. SDCGuest 5 years ago

    This tool doesn’t work in Canada for whatever, clearly inane, reason!

    You will get the ‘recognizer not present’ error if you try to use it.

    Can anyone explain why the recognizer is not available on Canadian phones?

  16. matt wolfeGuest 5 years ago

    also wondering why there is no voice recognicion in canada…first no toutchscreen keyboard and now no voice recognition. not to mention crummy service…man rogers blowz!

  17. why can’t I download the file??

  18. Symbian BlogGuest 5 years ago

    [...] we can audio samples to a dedicated component that extracts the desired features. (Nuance and Google use a similar approach in their mobile voice recognition [...]

  19. BodhiGuest 5 years ago

    G2 in the UK “recognizer not present”. : (

  20. TATIFGuest 5 years ago

    est ce que je peut le tester dans mon pc avant de tester dans le téléphone
    merci

  21. je suis entrain de realiser une application pour programmer un clavier vocale (au lieu de tapper une lettre par exemple “A”, l’utilisateur va la dicter directement puis l’application doit reconnaitre la lettre ” A” puis elle sera afficher a l’ecran du smartphone ) = pour faciliter la saisie des sms; j’aimerai bien que je trouve un aide sur les api de reconnaissance et synthese voclae pour android.
    la deuxieme chose est : est ce que l’emulateur d’android prend en charge les applications de reconnaissance et synthese vocale;

    • je suis entrain de realiser une application pour programmer un clavier vocale (au lieu de tapper une lettre par exemple “A”, l’utilisateur va la dicter directement puis l’application doit reconnaitre la lettre ” A” puis elle sera afficher a l’ecran du smartphone ) = pour faciliter la saisie des sms; j’aimerai bien que je trouve un aide sur les api de reconnaissance et synthese voclae pour android.
      la deuxieme chose est : est ce que l’emulateur d’android prend en charge les applications de reconnaissance et synthese vocale;

  22. sudheendraGuest 5 years ago

    how do i download this ? there is no download link available here.

  23. Voice Recognizer Demo | Android AppsGuest 5 years ago

    [...] it to text. See article link below for details.Developed by Alex ByrnesCostFreeDeveloper Sitehttp://www.androidandme.com/2009/05/news/cupcake-voice-recognition-now-available-for-testing/Market Link market://search?q=pname:com.example.VoiceRecognizer GD Star Ratingloading…GD Star [...]

  24. meGuest 4 years ago

    how the hek do you dl it ?
    must u be logged or what