Error class

ru.yandex.speechkit

java.lang.Object ⇽ Error

public  class  Error  implements java.io.Serializable

Implements the interfaces:
java.io.Serializable

Descriptions of errors that may occur in various library components.

The callback methods RecognizerListener.onError and InitializerListener.onError notify of errors.

Constructors

Error(int code, String message)

Methods

native ErrorfromCode(int code)

Returns an error.

intgetCode()

Returns the error code.

StringgetString()

Returns a string with the error description.

Fields

intERROR_API_KEY

Error verifying the API key.

intERROR_AUDIO

Audio recording error.

intERROR_AUDIO_INTERRUPTED

Stopped working with audio.

intERROR_AUDIO_PERMISSIONS

The app doesn't have permission to use the microphone.

intERROR_AUDIO_PLAYER

Audio production error.

intERROR_BUSY

Another operation in progress.

intERROR_CANCELED

Operation canceled.

intERROR_ENCODING

Encoding error.

intERROR_LANGUAGE_NOT_SUPPORTED_FOR_MODEL

The language is not supported for the selected model.

intERROR_NETWORK

Network error.

intERROR_NO_SPEECH

No speech detected.

intERROR_NO_TEXT_TO_SYNTHESIZE

Error converting text to speech.

intERROR_NOT_AVAILABLE

Service is not available.

intERROR_OK

No error.

intERROR_SERVER

Server-side error.

intERROR_UNKNOWN

Unknown error.

Constructor descriptions

Error

public Error (int code, String message)

Parameters:
code

Error code.

message

Error description.

Method descriptions

fromCode

public static native Error fromCode (int code)

Returns an error.

Parameters:
code

Error code.

getCode

public int getCode ()

Returns the error code.

Returns:

Error code.

getString

public String getString ()

Returns a string with the error description.

Returns:

Error description string.

Field descriptions

ERROR_API_KEY

public static final int ERROR_API_KEY ()

Error verifying the API key.

ERROR_AUDIO

public static final int ERROR_AUDIO ()

Audio recording error.

ERROR_AUDIO_INTERRUPTED

public static final int ERROR_AUDIO_INTERRUPTED ()

Stopped working with audio.

ERROR_AUDIO_PERMISSIONS

public static final int ERROR_AUDIO_PERMISSIONS ()

The app doesn't have permission to use the microphone.

ERROR_AUDIO_PLAYER

public static final int ERROR_AUDIO_PLAYER ()

Audio production error.

ERROR_BUSY

public static final int ERROR_BUSY ()

Another operation in progress.

ERROR_CANCELED

public static final int ERROR_CANCELED ()

Operation canceled.

ERROR_ENCODING

public static final int ERROR_ENCODING ()

Encoding error.

ERROR_LANGUAGE_NOT_SUPPORTED_FOR_MODEL

public static final int ERROR_LANGUAGE_NOT_SUPPORTED_FOR_MODEL ()

The language is not supported for the selected model.

ERROR_NETWORK

public static final int ERROR_NETWORK ()

Network error.

ERROR_NOT_AVAILABLE

public static final int ERROR_NOT_AVAILABLE ()

Service is not available.

ERROR_NO_SPEECH

public static final int ERROR_NO_SPEECH ()

No speech detected.

ERROR_NO_TEXT_TO_SYNTHESIZE

public static final int ERROR_NO_TEXT_TO_SYNTHESIZE ()

Error converting text to speech.

ERROR_OK

public static final int ERROR_OK ()

No error.

ERROR_SERVER

public static final int ERROR_SERVER ()

Server-side error.

ERROR_UNKNOWN

public static final int ERROR_UNKNOWN ()

Unknown error.