Class SpeakerRecognitionCancellationDetails
- java.lang.Object
-
- com.microsoft.cognitiveservices.speech.speaker.SpeakerRecognitionCancellationDetails
-
public class SpeakerRecognitionCancellationDetails extends Object
Contains detailed information about why a speaker recognition was canceled.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Explicitly frees any external resource attached to the objectstatic SpeakerRecognitionCancellationDetailsfromResult(SpeakerRecognitionResult result)Creates an instance of SpeakerRecognitionCancellationDetails object for the canceled SpeakerRecognitionResult.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 cancellation details.
-
-
-
Method Detail
-
fromResult
public static SpeakerRecognitionCancellationDetails fromResult(SpeakerRecognitionResult result)
Creates an instance of SpeakerRecognitionCancellationDetails object for the canceled SpeakerRecognitionResult.- Parameters:
result- The speaker recognition result that was canceled.- Returns:
- The cancellation details object being created.
-
close
public void close()
Explicitly frees any external resource attached to the object
-
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.
-
-