FileDocCategorySizeDatePackage
IRecognitionService.javaAPI DocAndroid 5.1 API7188Sat Mar 14 05:48:08 GMT 2015android.speech

IRecognitionService

public interface IRecognitionService implements android.os.IInterface
A Service interface to speech recognition. Call startListening when you want to begin capturing audio; RecognitionService will automatically determine when the user has finished speaking, stream the audio to the recognition servers, and notify you when results are ready. In most of the cases, this class should not be used directly, instead use {@link SpeechRecognizer} for accessing recognition service. {@hide}

Fields Summary
Constructors Summary
Methods Summary
public voidcancel(android.speech.IRecognitionListener listener)
Cancels the speech recognition.

param
listener to receive callbacks, note that this must be non-null

public voidstartListening(android.content.Intent recognizerIntent, android.speech.IRecognitionListener listener)
Starts listening for speech. Please note that the recognition service supports one listener only, therefore, if this function is called from two different threads, only the latest one will get the notifications

param
recognizerIntent the intent from which the invocation occurred. Additionally, this intent can contain extra parameters to manipulate the behavior of the recognition client. For more information see {@link RecognizerIntent}.
param
listener to receive callbacks, note that this must be non-null

public voidstopListening(android.speech.IRecognitionListener listener)
Stops listening for speech. Speech captured so far will be recognized as if the user had stopped speaking at this point. The function has no effect unless it is called during the speech capturing.

param
listener to receive callbacks, note that this must be non-null