Class Error

ru.yandex.speechkit

java.lang.Object ⇽ Error

public  class  Error  implements java.io.Serializable

All Implemented Interfaces:
java.io.Serializable

Descriptions of errors that may occur in various library components.

Constructors

Error(int code, String message)

Creates an object of the Error class.

Methods

intgetCode()

Returns the error code.

StringgetMessage()

Returns a string with the error description.

StringtoString()

Fields

final intERROR_AUDIO_ENCODING

Encoding error.

final intERROR_AUDIO_INTERRUPTED

Stopped working with audio.

final intERROR_AUDIO_PERMISSIONS

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

final intERROR_AUDIO_PERMISSIONS_WITH_NEVER_ASK_AGAIN

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

final intERROR_AUDIO_PLAYING

Audio production error.

final intERROR_AUDIO_RECORDING

Audio recording error.

final intERROR_BIOMETRY

The biometric request (registration, identification) failed.

final intERROR_INVALID_API_KEY

Error verifying the API key.

final intERROR_MODEL

Error working with the model.

final intERROR_NETWORK

Network error.

final intERROR_NO_SPEECH_DETECTED

No speech detected.

final intERROR_NO_TEXT_TO_SYNTHESIZE

Error converting text to speech.

final intERROR_PLATFORM_RECOGNITION

Platform recognition error.

final intERROR_SERVER

Server-side error.

Constructor Detail

Error

public Error (int code, String message)

Creates an object of the Error class.

Parameters:
code

Error code.

message

Error description.

Method Detail

getCode

public int getCode ()

Returns the error code.

Returns:

Error code.

getMessage

public String getMessage ()

Returns a string with the error description.

Returns:

Error description string.

toString

public String toString ()

Field Detail

ERROR_AUDIO_ENCODING

public static ERROR_AUDIO_ENCODING = 6

Encoding error.

ERROR_AUDIO_INTERRUPTED

public static ERROR_AUDIO_INTERRUPTED = 5

Stopped working with audio.

ERROR_AUDIO_PERMISSIONS

public static ERROR_AUDIO_PERMISSIONS = 4

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

ERROR_AUDIO_PERMISSIONS_WITH_NEVER_ASK_AGAIN

public static ERROR_AUDIO_PERMISSIONS_WITH_NEVER_ASK_AGAIN = 14

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

The user selected "Never ask again" in the permission request window.

ERROR_AUDIO_PLAYING

public static ERROR_AUDIO_PLAYING = 3

Audio production error.

ERROR_AUDIO_RECORDING

public static ERROR_AUDIO_RECORDING = 2

Audio recording error.

ERROR_BIOMETRY

public static ERROR_BIOMETRY = 12

The biometric request (registration, identification) failed.

The error may be caused by the following reasons: not enough audio, problems working with the database, or incorrect audio format.

ERROR_INVALID_API_KEY

public static ERROR_INVALID_API_KEY = 1

Error verifying the API key.

ERROR_MODEL

public static ERROR_MODEL = 11

Error working with the model.

ERROR_NETWORK

public static ERROR_NETWORK = 7

Network error.

ERROR_NO_SPEECH_DETECTED

public static ERROR_NO_SPEECH_DETECTED = 9

No speech detected.

ERROR_NO_TEXT_TO_SYNTHESIZE

public static ERROR_NO_TEXT_TO_SYNTHESIZE = 10

Error converting text to speech.

ERROR_PLATFORM_RECOGNITION

public static ERROR_PLATFORM_RECOGNITION = 13

Platform recognition error.

ERROR_SERVER

public static ERROR_SERVER = 8

Server-side error.