# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

# RecognitionListener

`public interface RecognitionListener`
``

android.speech.RecognitionListener

Used for receiving notifications from the SpeechRecognizer when the recognition related events occur. All the callbacks are executed on the Application main thread.

## Summary

### Public methods
`abstract void` | `onBeginningOfSpeech()` The user has started to speak.
`abstract void` | `onBufferReceived(byte[] buffer)` More sound has been received.
`abstract void` | `onEndOfSpeech()` Called after the user stops speaking.
`abstract void` | `onError(int error)` A network or recognition error occurred.
`abstract void` | `onEvent(int eventType, Bundle params)` Reserved for adding future events.
`abstract void` | `onPartialResults(Bundle partialResults)` Called when partial recognition results are available.
`abstract void` | `onReadyForSpeech(Bundle params)` Called when the endpointer is ready for the user to start speaking.
`abstract void` | `onResults(Bundle results)` Called when recognition results are ready.
`abstract void` | `onRmsChanged(float rmsdB)` The sound level in the audio stream has changed.

## Public methods

### onBeginningOfSpeech

    public abstract void onBeginningOfSpeech ()

The user has started to speak.

### onBufferReceived

    public abstract void onBufferReceived (byte[] buffer)

More sound has been received. The purpose of this function is to allow giving feedback to the user regarding the captured audio. There is no guarantee that this method will be called.

Parameters
`buffer` | `byte`: a buffer containing a sequence of big-endian 16-bit integers representing a single channel audio stream. The sample rate is implementation dependent.

### onEndOfSpeech

    public abstract void onEndOfSpeech ()

Called after the user stops speaking.

### onError

    public abstract void onError (int error)

A network or recognition error occurred.

Parameters
`error` | `int`: code is defined in `SpeechRecognizer`

### onEvent

    public abstract void onEvent (int eventType,
                    Bundle params)

Reserved for adding future events.

Parameters
`eventType` | `int`: the type of the occurred event
`params` | `Bundle`: a Bundle containing the passed parameters

### onPartialResults

    public abstract void onPartialResults (Bundle partialResults)

Called when partial recognition results are available. The callback might be called at any time between `onBeginningOfSpeech()` and `onResults(android.os.Bundle)` when partial results are ready. This method may be called zero, one or multiple times for each call to `SpeechRecognizer#startListening(Intent)`, depending on the speech recognition service implementation. To request partial results, use `RecognizerIntent#EXTRA_PARTIAL_RESULTS`

Parameters
`partialResults` | `Bundle`: the returned results. To retrieve the results in ArrayList<String> format use `Bundle#getStringArrayList(String)` with `SpeechRecognizer#RESULTS_RECOGNITION` as a parameter

### onReadyForSpeech

    public abstract void onReadyForSpeech (Bundle params)

Called when the endpointer is ready for the user to start speaking.

Parameters
`params` | `Bundle`: parameters set by the recognition service. Reserved for future use.

### onResults

    public abstract void onResults (Bundle results)

Called when recognition results are ready.

Parameters
`results` | `Bundle`: the recognition results. To retrieve the results in `ArrayList<String>` format use `Bundle#getStringArrayList(String)` with `SpeechRecognizer#RESULTS_RECOGNITION` as a parameter. A float array of confidence values might also be given in `SpeechRecognizer#CONFIDENCE_SCORES`.

### onRmsChanged

    public abstract void onRmsChanged (float rmsdB)

The sound level in the audio stream has changed. There is no guarantee that this method will be called.

Parameters
`rmsdB` | `float`: the new RMS dB value

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*