SpeechRecognitionCanceledEventArgs Class

public final class SpeechRecognitionCanceledEventArgs
extends SpeechRecognitionEventArgs

Defines payload of speech recognition canceled events.

Constructor Summary

Constructor Description
SpeechRecognitionCanceledEventArgs(long eventArgs)

Constructs an instance of a SpeechRecognitionCanceledEventArgs object.

SpeechRecognitionCanceledEventArgs(long eventArgs, boolean dispose)

Speech Recognition Canceled Event ARGS

Method Summary

Modifier and Type Method and Description
CancellationErrorCode getErrorCode()

The error code in case of an unsuccessful recognition (when getReason() returns Error).

java.lang.String getErrorDetails()

The error message in case of an unsuccessful recognition (when getReason() returns Error).

CancellationReason getReason()

The reason the recognition was canceled.

java.lang.String toString()

Returns a String that represents the speech recognition canceled event args.

Methods inherited from RecognitionEventArgs

Methods inherited from SessionEventArgs

Methods inherited from SpeechRecognitionEventArgs

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

SpeechRecognitionCanceledEventArgs

public SpeechRecognitionCanceledEventArgs(long eventArgs)

Constructs an instance of a SpeechRecognitionCanceledEventArgs object.

Parameters:

eventArgs - recognition canceled event args object.

SpeechRecognitionCanceledEventArgs

public SpeechRecognitionCanceledEventArgs(long eventArgs, boolean dispose)

Speech Recognition Canceled Event ARGS

Parameters:

eventArgs - Args for the event.
dispose - Should the event args be disposed when done.

Method Details

getErrorCode

public CancellationErrorCode getErrorCode()

The error code in case of an unsuccessful recognition (when getReason() returns Error). Added in version 1.1.0.

Returns:

An error code that represents the error reason.

getErrorDetails

public String getErrorDetails()

The error message in case of an unsuccessful recognition (when getReason() returns Error).

Returns:

A String that represents the error details.

getReason

public CancellationReason getReason()

The reason the recognition was canceled.

Returns:

Specifies the reason canceled.

toString

public String toString()

Returns a String that represents the speech recognition canceled event args.

Overrides:

SpeechRecognitionCanceledEventArgs.toString()

Returns:

A String that represents the speech recognition canceled event args.

Applies to