Class SpeechRecognitionCanceledEventArgs
- java.lang.Object
-
- com.microsoft.cognitiveservices.speech.SessionEventArgs
-
- com.microsoft.cognitiveservices.speech.RecognitionEventArgs
-
- com.microsoft.cognitiveservices.speech.SpeechRecognitionEventArgs
-
- com.microsoft.cognitiveservices.speech.SpeechRecognitionCanceledEventArgs
-
public final class SpeechRecognitionCanceledEventArgs extends SpeechRecognitionEventArgs
Defines payload of speech recognition canceled events.
-
-
Field Summary
-
Fields inherited from class com.microsoft.cognitiveservices.speech.RecognitionEventArgs
offset
-
Fields inherited from class com.microsoft.cognitiveservices.speech.SessionEventArgs
eventHandle
-
-
Constructor Summary
Constructors Constructor Description SpeechRecognitionCanceledEventArgs(long eventArgs)Constructs an instance of a SpeechRecognitionCanceledEventArgs object.SpeechRecognitionCanceledEventArgs(long eventArgs, boolean dispose)Speech Recognition Canceled Event ARGS
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CancellationErrorCodegetErrorCode()The error code in case of an unsuccessful recognition (when getReason() returns Error).StringgetErrorDetails()The error message in case of an unsuccessful recognition (when getReason() returns Error).CancellationReasongetReason()The reason the recognition was canceled.StringtoString()Returns a String that represents the speech recognition canceled event args.-
Methods inherited from class com.microsoft.cognitiveservices.speech.SpeechRecognitionEventArgs
getResult
-
Methods inherited from class com.microsoft.cognitiveservices.speech.RecognitionEventArgs
getRecognitionResult
-
Methods inherited from class com.microsoft.cognitiveservices.speech.SessionEventArgs
close, getSessionId
-
-
-
-
Constructor Detail
-
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 Detail
-
getReason
public CancellationReason getReason()
The reason the recognition was canceled.- Returns:
- Specifies the reason canceled.
-
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.
-
toString
public String toString()
Returns a String that represents the speech recognition canceled event args.- Overrides:
toStringin classSpeechRecognitionEventArgs- Returns:
- A String that represents the speech recognition canceled event args.
-
-