Freigeben über


VoiceProfilePhraseCancellationDetails Class

  • java.lang.Object
    • com.microsoft.cognitiveservices.speech.speaker.VoiceProfilePhraseCancellationDetails

public class VoiceProfilePhraseCancellationDetails

Contains detailed information about why voice profile activation phrase request was canceled.

Method Summary

Modifier and Type Method and Description
static VoiceProfilePhraseCancellationDetails fromResult(VoiceProfilePhraseResult result)

Creates an instance of VoiceProfilePhraseCancellationDetails object for the canceled VoiceProfilePhraseResult.

CancellationErrorCode getErrorCode()

The error code in case of an unsuccessful activation phrase request (when getReason() returns Error).

java.lang.String getErrorDetails()

The error message in case of an unsuccessful activation phrase request (when getReason() returns Error).

CancellationReason getReason()

The reason the activation phrase request was canceled.

java.lang.String toString()

Returns a String that represents the cancellation details.

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.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Method Details

fromResult

public static VoiceProfilePhraseCancellationDetails fromResult(VoiceProfilePhraseResult result)

Creates an instance of VoiceProfilePhraseCancellationDetails object for the canceled VoiceProfilePhraseResult.

Parameters:

result - The voice profile phrase result that was canceled.

Returns:

The cancellation details object being created.

getErrorCode

public CancellationErrorCode getErrorCode()

The error code in case of an unsuccessful activation phrase request (when getReason() returns Error).

Returns:

An error code that represents the error reason.

getErrorDetails

public String getErrorDetails()

The error message in case of an unsuccessful activation phrase request (when getReason() returns Error).

Returns:

A String that represents the error details.

getReason

public CancellationReason getReason()

The reason the activation phrase request was canceled.

Returns:

Specifies the reason canceled.

toString

public String toString()

Returns a String that represents the cancellation details.

Overrides:

VoiceProfilePhraseCancellationDetails.toString()

Returns:

A String that represents the cancellation details.

Applies to