We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.

Only Essential Cookies
Accept All

ArkTS API Error Codes

NOTE

This section describes only module-specific error codes. For details about universal error codes, please refer to Universal Error Codes.

1002200001 Engine Creation Failed

Message

Create engine failed.

Symptom

Engine creation failed.

Possible causes

  1. The language is not supported.

  2. The mode is not supported.

  3. The needed resource does not exist or the initialization times out.

  4. Frequent engine creation and destruction cause resource competition, resulting in a creation failure.

Solution

  1. Call the listLanguages method to query the supported languages. Then try again.

  2. Currently, only CreateEngineParams is supported. Try again after confirming the mode.

  3. If the needed resource does not exist or the initialization times out, try again later.

  4. Store the created engine instance. In scenarios where the engine parameters are the same, reuse the engine instance instead of destroying it immediately after use. Destroy the engine instance only when it is no longer needed.

1002200002: Failed to Start Recognition

Message

Start listening failed.

Symptom

Failed to start recognition.

Possible causes

Speech recognition has already been started and is started again.

Solution

Check whether speech recognition has been started. Do not start it repeatedly.

1002200003 Audio Too Long

Message

Exceeded the maximum audio length supported.

Symptom

The audio length exceeds the maximum.

Possible causes

The audio length exceeds the maximum.

Solution

It is recommended that the audio not exceed 60,000 ms. After adjusting the length, try again.

1002200004 Failed to End Recognition

Message

Finish recognition failed.

Symptom

Failed to end recognition.

Possible causes

No recognition task exists.

Solution

Call the startListening method to start the speech recognition task and try again.

1002200005 Failed to Cancel Recognition

Message

Cancel recognition failed.

Symptom

Failed to cancel recognition.

Possible causes

No recognition task exists.

Solution

Call the startListening method to start the speech recognition task and try again.

1002200006 Service Busy

Message

The engine of SpeechRecognition is busy.

Symptom

The recognition service is busy.

Possible causes

The engine is performing a recognition task.

Solution

Call the isBusy method to query the service status and try again when the service is idle.

1002200007 Engine Not Initialized

Message

The engine is not initialized.

Symptom

The engine has not been initialized.

Possible causes

The engine has not been initialized.

Solution

Call the speechRecognizer.createEngine method to initialize the engine and try again.

1002200008 Engine Destroyed

Message

The engine of SpeechRecognition is being destroyed.

Symptom

The engine has been destroyed.

Possible causes

The engine has been destroyed.

Solution

Call the speechRecognizer.createEngine method to initialize the engine and try again.

1002200009 Internal Service Error

Message

Internal Service Error.

Symptom

Internal service error.

Possible causes

  1. An internal service error occurred, preventing the engine function from being called.

  2. The service process is terminated due to a system exception.

Solution

Call the API again and rectify the fault based on the error information.

If the error persists, submit a ticket online. Huawei will get back to you as soon as possible.

1002200010 Speech Recognition Not Started

Message

Write audio failed because the start listening is failed.

Symptom

The engine has not started recognition.

Possible causes

The engine has not started recognition.

Solution

Call the startListening method to start the speech recognition task and try again.

1002200011 Speech Recognition Exception

Message

Error in recognition.

Symptom

An exception occurs during speech recognition.

Possible causes

An exception occurs during speech recognition.

Solution

Call the startListening method to try again.

1002200012 No Microphone Permission

Message

AudioCapturer create failed, please check the permission of MICROPHONE.

Symptom

Failed to create the AudioCapturer. Check the microphone permission.

Possible causes

The microphone permission is not obtained.

Solution

Check whether the microphone permission has been obtained. For details, see step 10 in Development Procedure.

1002300001 Invalid Text Length

Message

The length of text is out of range or empty.

Symptom

Invalid text length.

Possible causes

The text length is 0 or exceeds 10,000 characters.

Solution

Modify the text and try again.

1002300002: Unsupported Language

Message

The language is not supported.

Symptom

The language is not supported.

Possible causes

An unsupported language is used.

Solution

Call the listVoices method to query the supported languages. Select a supported language and try again.

1002300003 Unsupported Timbre

Message

The person is not supported.

Symptom

The timbre is not supported.

Possible causes

An unsupported timbre is used.

Solution

Call the listVoices method to query the supported timbres. Select a supported timbre and try again.

1002300005 Engine Creation Failed

Message

Create engine failed.

Symptom

Engine creation failed.

Possible causes

  1. The engine service is abnormal.

  2. Failed to load engine resources.

Solution

Try again later.

1002300008 Failed to Download a Timbre

Message

Failed to download voice.

Symptom

The API provided by the TTS capability for downloading a timbre does not work.

Possible causes

The network is unavailable, or an internal service error occurs.

Solution

Try again later.

1002300009 Invalid Download Parameters

Message

Parameter error. Possible causes:

  1. Mandatory parameters are left unspecified.

  2. Incorrect parameter types.

  3. Parameter verification failed.

Symptom

The parameters passed to the download API of the TTS capability are invalid.

Possible causes

The parameters are not passed according to the requirements.

Solution

Ensure that the input parameter is correct and try again.

1002300010 Timbre Already Downloaded

Message

Voice has already been downloaded.

Symptom

The TTS timbre has already been downloaded.

Possible causes

The timbre has already been downloaded.

Solution

Query timbres that have not been downloaded through the query API.