| class info |
| com.huawei.hms.mlsdk.asr.MLAsrConstants |
| 实时语音识别服务配置常量定义。 |
| Type | Name | Desc |
| String | ACTION_HMS_ASR_SPEECH | 启动识别器时创建Intent的ACTION名称。 |
| int | ERR_NO_NETWORK | 网络错误。 |
| int | ERR_NO_UNDERSTAND | 无法识别的语音。 |
| int | ERR_SERVICE_UNAVAILABLE | 服务不可用。 |
| String | FEATURE | 插件特性KEY,当前支持实时出字和识别结束后整段出字两种特性。 |
| int | FEATURE_ALLINONE | 整段识别特性,说话过程中不出字,说完后一次性返回识别结果。 |
| int | FEATURE_WORDFLUX | 实时出字特性,边说话边出字。 |
| String | LANGUAGE | 说话人使用的语言类型。 |
| String | LAN_EN_US | 语言类型:英语(美国) |
| String | LAN_FR_FR | 语言类型:法语(法国) |
| String | LAN_ZH | 语言类型:中文、普通话(中国简体)同 LAN_ZH_CN。 |
| String | LAN_ZH_CN | 语言类型:中文、普通话(中国简体)。 |
| int | STATE_LISTENING | onState回调中的状态码,表示录音机已经准备好。 |
| int | STATE_NO_NETWORK | onState回调中的状态码,表示当前环境没有网络。 |
| int | STATE_NO_SOUND | onState回调中的状态码,表示3s内没有检测到没有说话。 |
| int | STATE_NO_SOUND_TIMES_EXCEED | onState回调中的状态码,表示6s内没有检测到结果。 |
| int | STATE_NO_UNDERSTAND | onState回调中的状态码,表示当前帧云端检测失败。 |
| int | STATE_WAITING | onState回调中的状态码,表示第一次发送数据时在弱网情况下。 |
| Constant |
| public static final String ACTION_HMS_ASR_SPEECH |
创建startRecognizing接口中的Intent参数所使用的ACTION名称。 Constant Value:“RECOGNIZE_SPEECH” |
| Constant |
| public static final int ERR_NO_NETWORK |
| 网络错误。 |
| Constant Value:11202 |
| Constant |
| public static final int ERR_NO_UNDERSTAND |
| 无法识别的语音。 |
| Constant Value:11204 |
| Constant |
| public static final int ERR_SERVICE_UNAVAILABLE |
| 服务不可用。 |
| Constant Value:11203 |
| Constant |
| public static final String FEATURE |
| startRecognizing接口中Intent携带的用于设置识别模式的KEY,当前支持实时出字和识别结束后整段出字两种特性。 |
FEATURE_WORDFLUX:实时出字。 FEATURE_ALLINONE:识别结束后整段出字。 Constant Value:”FEATURE” |
| Constant |
| public static final int FEATURE_ALLINONE |
| 整段识别特性, 说话过程中不出字,说完后一次性返回识别结果。 |
| Constant Value:12 |
| Constant |
| public static final int FEATURE_WORDFLUX |
| 实时出字特性, 边说话边出字。 |
| Constant Value:11 |
| Constant |
| public static final String LANGUAGE |
| startRecognizing接口中Intent携带的用于设置说话人使用的语言KEY,当前支持: |
LAN_ZH/LAN_ZH_CN:中文普通话。 LAN_EN_US:英文(默认值)。 LAN_FR_FR:法语。 Constant Value:”LANGUAGE” |
| Constant |
| public static final String LAN_EN_US |
| 语言类型:英语(美国)。 |
| Constant Value:”en-US” |
| Constant |
| public static final String LAN_FR_FR |
| 语言类型:法语(法国)。 |
| Constant Value:”fr-FR” |
| Constant |
| public static final String LAN_ZH |
| 语言类型:中文、普通话(中国简体)同 LAN_ZH_CN。 |
| Constant Value:”zh” |
| Constant |
| public static final String LAN_ZH_CN |
| 语言类型:中文、普通话(中国简体)。 |
| Constant Value:”zh-CN” |
| Constant |
| public static final int STATE_LISTENING |
| onState回调中的状态码,表示录音机已经准备好。 |
| Constant Value:1 |
| Constant |
| public static final int STATE_NO_NETWORK |
| onState回调中的状态码,表示当前环境没有网络。 |
| Constant Value:7 |
| Constant |
| public static final int STATE_NO_SOUND |
| onState回调中的状态码,表示3s内没有检测到没有说话。 |
| Constant Value:2 |
| Constant |
| public static final int STATE_NO_SOUND_TIMES_EXCEED |
| onState回调中的状态码,表示6s内没有检测到结果。 |
| Constant Value:3 |
| Constant |
| public static final int STATE_NO_UNDERSTAND |
| onState回调中的状态码,表示当前帧云端检测失败。 |
| Constant Value:6 |
| Constant |
| public static final int STATE_WAITING |
| onState回调中的状态码,表示第一次发送数据时在弱网情况下。 |
| Constant Value:9 |