Enum CancellationErrorCode
- java.lang.Object
-
- java.lang.Enum<CancellationErrorCode>
-
- com.microsoft.cognitiveservices.speech.CancellationErrorCode
-
- All Implemented Interfaces:
Serializable,Comparable<CancellationErrorCode>
public enum CancellationErrorCode extends Enum<CancellationErrorCode>
Defines error code in case that CancellationReason is Error. Added in version 1.1.0.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AuthenticationFailureIndicates an authentication error.BadRequestIndicates that one or more recognition parameters are invalid or the audio format is not supported.ConnectionFailureIndicates a connection error.EmbeddedModelErrorIndicates the embedded speech (SR or TTS) model is not available or corrupted.ForbiddenIndicates that the free subscription used by the request ran out of quota.NoErrorIndicates that no error occurred during speech recognition.RuntimeErrorIndicates an unexpected runtime error.ServiceErrorIndicates that an error is returned by the service.ServiceRedirectPermanentIndicates the Speech Service is permanently requesting a reconnect to a different endpoint.ServiceRedirectTemporaryIndicates the Speech Service is temporarily requesting a reconnect to a different endpoint.ServiceTimeoutIndicates a time-out error when waiting for response from service.ServiceUnavailableIndicates that the service is currently unavailable.TooManyRequestsIndicates that the number of parallel requests exceeded the number of allowed concurrent transcriptions for the subscription.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetValue()Returns the internal value error codestatic CancellationErrorCodevalueOf(String name)Returns the enum constant of this type with the specified name.static CancellationErrorCode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NoError
public static final CancellationErrorCode NoError
Indicates that no error occurred during speech recognition. If CancellationReason is EndOfStream, CancellationErrorCode is set to NoError.
-
AuthenticationFailure
public static final CancellationErrorCode AuthenticationFailure
Indicates an authentication error. An authentication error occurs if subscription key or authorization token is invalid, expired, or does not match the region being used.
-
BadRequest
public static final CancellationErrorCode BadRequest
Indicates that one or more recognition parameters are invalid or the audio format is not supported.
-
TooManyRequests
public static final CancellationErrorCode TooManyRequests
Indicates that the number of parallel requests exceeded the number of allowed concurrent transcriptions for the subscription.
-
Forbidden
public static final CancellationErrorCode Forbidden
Indicates that the free subscription used by the request ran out of quota.
-
ConnectionFailure
public static final CancellationErrorCode ConnectionFailure
Indicates a connection error.
-
ServiceTimeout
public static final CancellationErrorCode ServiceTimeout
Indicates a time-out error when waiting for response from service.
-
ServiceError
public static final CancellationErrorCode ServiceError
Indicates that an error is returned by the service.
-
ServiceUnavailable
public static final CancellationErrorCode ServiceUnavailable
Indicates that the service is currently unavailable.
-
RuntimeError
public static final CancellationErrorCode RuntimeError
Indicates an unexpected runtime error.
-
ServiceRedirectTemporary
public static final CancellationErrorCode ServiceRedirectTemporary
Indicates the Speech Service is temporarily requesting a reconnect to a different endpoint. Used internally
-
ServiceRedirectPermanent
public static final CancellationErrorCode ServiceRedirectPermanent
Indicates the Speech Service is permanently requesting a reconnect to a different endpoint. Used internally
-
EmbeddedModelError
public static final CancellationErrorCode EmbeddedModelError
Indicates the embedded speech (SR or TTS) model is not available or corrupted.
-
-
Method Detail
-
values
public static CancellationErrorCode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (CancellationErrorCode c : CancellationErrorCode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CancellationErrorCode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getValue
public int getValue()
Returns the internal value error code- Returns:
- the error code
-
-