I use the following code to invoke the voice recognizer by google:
// This is a demonstration of Android\'s built in speech recognizer
package com.example
In jellybean the user needs to download the offline speech recognition package.
This article sais:
Previously, when you pressed the voice icon and spoke a command or query, Android had to digitize your voice, upload it to the cloud, process the waveform, turn it into text, and send the text back down to your phone. Now the phones are powerful enough that this can be built into the device, with no extra network I/O needed. As you can imagine this results in much faster voice recognition than previous versions.
The app user will have to do this:
Another helper link:
Google have restricted certain Jelly Bean devices from using the offline recognition due to hardware constraints.