Android Voice Recognition Example

  • 0

Android Voice Recognition Example

Category : Uncategorized

Google provides an option to search the web using voice command . Let us create a similar Voice Recognition Application( Speech to text Application) in android. In this example we will have a button to initiate speech recognition, by tapping on it we call the voice/speech recognition API where the voice is recognized and converted into text .Finally we will display the results that was recognized in a ListView.

Voice recognition featured in android is achieved using the RecognizerIntent.Use the Recognizer class in an intent to call the voice API.Here we check for the recognizer in the device if available the speech to text happen else we show a toast displaying ‘Recognizer Not Found’

Note: This application will not work in emulator since it does not have the recognizer, so test it in a device and it also requires an internet connection.

So Lets Start:

1.Create an android application with any package name and project name.Name the Activity as VoiceActivity and the layout file as voice_demo.
2.Let us design the UI for the activity with a TextView,Button and ListView as follows








Leave a Reply