SpeechSynthesisCancellationDetails Class
- java.
lang. Object - com.
microsoft. cognitiveservices. speech. SpeechSynthesisCancellationDetails
- com.
public class SpeechSynthesisCancellationDetails
Contains detailed information about why a speech synthesis was canceled. Added in version 1.7.0
Method Summary
Modifier and Type | Method and Description |
---|---|
void |
close()
Explicitly frees any external resource attached to the object |
static
Speech |
fromResult(SpeechSynthesisResult result)
Creates an instance of Speech |
static
Speech |
fromStream(AudioDataStream stream)
Creates an instance of Speech |
Cancellation |
getErrorCode()
The error code in case of an unsuccessful recognition (when get |
java.lang.String |
getErrorDetails()
The error message in case of an unsuccessful recognition (when get |
Cancellation |
getReason()
The reason the recognition was canceled. |
java.lang.String |
toString()
Returns a String that represents the cancellation details. |
Methods inherited from java.lang.Object
Method Details
close
public void close()
Explicitly frees any external resource attached to the object
fromResult
public static SpeechSynthesisCancellationDetails fromResult(SpeechSynthesisResult result)
Creates an instance of SpeechSynthesisCancellationDetails object for the canceled SpeechSynthesisResult.
Parameters:
Returns:
fromStream
public static SpeechSynthesisCancellationDetails fromStream(AudioDataStream stream)
Creates an instance of SpeechSynthesisCancellationDetails object for the canceled AudioDataStream.
Parameters:
Returns:
getErrorCode
public CancellationErrorCode getErrorCode()
The error code in case of an unsuccessful recognition (when getReason() returns Error). Added in version 1.1.0.
Returns:
getErrorDetails
public String getErrorDetails()
The error message in case of an unsuccessful recognition (when getReason() returns Error).
Returns:
getReason
public CancellationReason getReason()
The reason the recognition was canceled.
Returns:
toString
public String toString()
Returns a String that represents the cancellation details.
Overrides:
SpeechSynthesisCancellationDetails.toString()Returns: