目录

class info
com.huawei.hms.mlplugin.asr.MLAsrCaptureConstants
Defines constants of the ASR service.

Constant Summary

TypeNameDesc
StringASR_ERROR_CODE

Result codes.

11202: No internet connection; 

11203: The service is not available; 

11204: Unrecognized.

StringASR SUB ERROR CODESub-result code.
StringASR_ERROR_MESSAGEError information.
intASR_FAILURERecognition failure.
StringASR_RESULTRecognition result.
intASR_SUCCESSRecognition success.
StringFEATURE

Feature. Currently, the real-time and whole-section modes are supported. 

FEATURE_WORDFLUX: Speech is recognized in real time.

FEATURE_ALLINONE: Recognition result is returned after the speech is complete.

intFEATURE_ALLINONEAfter the speech is complete, the recognition result is returned at a time.
intFEATURE_WORDFLUXThe recognition result is returned along with the speech.
StringLANGUAGE

Language. Currently, Mandarin Chinese, English, and French are supported.

zh: Mandarin Chinese

en-US: English (default)

fr-FR: French

Public Constructor Summary

Constructor name
MLAsrCaptureConstants()

Constants

Constant
public static final String ASR_ERROR_CODE

Result codes. 

11202: No internet connection; 

11203: The service is not available; 

11204: Unrecognized.

Constant value: errorCode

Constant
public static final String ASR_SUB_ERROR_CODE

Sub-result code.

Constant value: subErrorCode

Constant
public static final String ASR_ERROR_MESSAGE

Error information.

Constant value: errorMessage

Constant
public static final int ASR_FAILURE

Recognition failure.

Constant value: –1

Constant
public static final String ASR_RESULT

Recognition result.

Constant value: result

Constant
public static final int ASR_SUCCESS

Recognition success.

Constant value: 0

Constant
public static final String FEATURE

Feature. Currently, the real-time and whole-section modes are supported. 

FEATURE_WORDFLUX: Speech is recognized in real time. 

FEATURE_ALLINONE: Recognition result is returned after the speech is complete.

Constant value: FEATURE

Constant
public static final int FEATURE_ALLINONE

After the speech is complete, the recognition result is returned at a time.

Constant value: 12

Constant
public static final int FEATURE_WORDFLUX

The recognition result is returned along with the speech.

Constant value: 11

Constant
public static final String LANGUAGE

Language. Currently, Mandarin Chinese, English, and French are supported.

zh: Mandarin Chinese

en-US: English (default)

fr-FR: French

Constant value: LANGUAGE