| class info |
| com.huawei.hms.mlsdk.asr.MLAsrConstants |
| Constants of the ASR service. |
| Type | Name | Desc |
| String | ACTION_HMS_ASR_SPEECH | Action name of Intent created when the recognizer is started. |
| int | ERR_NO_NETWORK | Network error. |
| int | ERR_NO_UNDERSTAND | Speech unrecognized. |
| int | ERR_SERVICE_UNAVAILABLE | Service unavailable. |
| String | FEATURE | Feature. Currently, the real-time result output and whole-section result output after recognition are supported. |
| int | FEATURE_ALLINONE | After the speech is complete, the recognition result is returned at a time. |
| int | FEATURE_WORDFLUX | The recognition result is returned along with the speech. |
| String | LANGUAGE | Language used by the speaker. |
| String | LAN_EN_US | English (US). |
| String | LAN_FR_FR | French. |
| String | LAN_ZH | Mandarin Chinese (Simplified Chinese). The value is the same as that of LAN_ZH_CN. |
| String | LAN_ZH_CN | Mandarin Chinese (Simplified Chinese). |
| int | STATE_LISTENING | Status code in the onState callback, indicating that the recorder is ready. |
| int | STATE_NO_NETWORK | Status code in the onState callback, indicating that no network is available in the current environment. |
| int | STATE_NO_SOUND | Status code in the onState callback, indicating that no speech is detected within 3s. |
| int | STATE_NO_SOUND_TIMES_EXCEED | Status code in the onState callback, indicating that no result is detected within 6s. |
| int | STATE_NO_UNDERSTAND | Status code in the onState callback, indicating that the current frame fails to be detected on the cloud. |
| int | STATE_WAITING | Status code in the onState callback, indicating that data is sent for the first time on a weak network. |
| Constant |
| public static final String ACTION_HMS_ASR_SPEECH |
| Action name used for creating the Intent parameter in startRecognizing. |
| Constant value: RECOGNIZE_SPEECH |
| Constant |
| public static final int ERR_NO_NETWORK |
| Network error. |
| Constant value: 11202 |
| Constant |
| public static final intERR_NO_UNDERSTAND |
| Speech unrecognized. |
| Constant value: 11204 |
| Constant |
| public static final int ERR_SERVICE_UNAVAILABLE |
| Service unavailable. |
| Constant value: 11203 |
| 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 LAN_EN_US |
| English (US). |
| Constant value: en-US |
| Constant |
| public static final String LAN_FR_FR |
| French. |
| Constant value: fr-FR |
| Constant |
| public static final String LAN_ZH |
| Mandarin Chinese (Simplified Chinese). The value is the same as that of LAN_ZH_CN. |
| Constant value: zh |
| Constant |
| public static final String LAN_ZH_CN |
| Mandarin Chinese (Simplified Chinese). |
| Constant value: zh-CN |
| Constant |
| public static final int STATE_LISTENING |
| Status code in the onState callback, indicating that the recorder is ready. |
| Constant value: 1 |
| Constant |
| public static final int STATE_NO_NETWORK |
| Status code in the onState callback, indicating that no network is available in the current environment. |
| Constant value: 7 |
| Constant |
| public static final int STATE_NO_SOUND |
| Status code in the onState callback, indicating that no speech is detected within 3s. |
| Constant value: 2 |
| Constant |
| public static final int STATE_NO_SOUND_TIMES_EXCEED |
| Status code in the onState callback, indicating that no result is detected within 6s. |
| Constant value: 3 |
| Constant |
| public static final int STATE_NO_UNDERSTAND |
| Status code in the onState callback, indicating that the current frame fails to be detected on the cloud. |
| Constant value: 6 |
| Constant |
| public static final int STATE_WAITING |
| Status code in the onState callback, indicating that data is sent for the first time on a weak network. |
| Constant value: 9 |