+91 99674 50288

Android Speech To Text

We can make use of voice command search on google in android .This is an inbuilt feature in android as android SDK has the capability to integrate the speech recognition services to turn speech into text.

With the help of this in-built feature we can add some of the interesting feature in app like filing form using speech and voice navigation,etc.

How the voice input works in background :

The voice input is streamed to a server ,on the server side the voice input is converted to text and the converted text can be used in app.

Steps to add speech input :

Step1: Starting the RecognizerIntent

1. It makes a call to the voice recognition intent that records voice.

2. Intent processes the voice and send it to the Voice Recognition Service

We can create a RecognizerIntent by setting the flags:

1. ACTION_RECOGNIZE_SPEECH : It takes the input of user voice.

2. LANGUAGE_MODEL_FREE_FORM : It takes the input in english

3. EXTRA_PROMPT : Its prompt the user asking them to speak.

4. EXTRA_MAX_RESULTS: It limits the maximum number of limits.

Step2: Receiving the response:

1. List of string is passed to implemented call back method

2. The string can be then processed in the application .

  Step3: Enabling Offline Mode:

       All the android devices do not support offline speech input. To enable the mode need to follow the steps:

1. Go to the device setting.

2. Select Language and Input .click on the Google Voice input.

3. Download the required language under ALL option.

4. Once the downloading is completed you can see it under the INSTALLED option.