# startSpeechMonitor ^5.9.0
启动语音监听
# 请求参数
Prop | Type | Required | Default | Description |
---|---|---|---|---|
param | Object | Y | {} 属性: auto: {//^5.10.0Type: Boolean, Default: N/A, Description: 是否启动后马上监听还是处于暂停状态,默认是true } mode: {//^5.10.0Type: String, Default: N/A, Description: local/online,设置是APP本地词库识别还是网络在线识别,默认为local本地词库识别。APP本地词库只是有限的几个词:“上一页,下一页”等,随APP版本迭代 } deviceType: {//^5.10.0Type: String, Default: N/A, Description: 设备类型,如0xAC,可选项,当mode=online时才生效,当需要控制指定设备时填写 } deviceId: {//^5.10.0Type: String, Default: N/A, Description: 设备ID,可选项,可选项,当mode=online时才生效,当需要控制指定设备时填写 } | 请求参数 |
# 接口调用示例
this.$bridge
.startSpeechMonitor(params)
.then(res => {
this.$alert(res)
})
.catch(err => {
this.$toast(err)
})
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
# 返回参数
- 成功时返回
Prop | Type | Default | Description |
---|---|---|---|
status | Number | N/A | 0 开始语音监听成功 |
- 失败时返回
Prop | Type | Default | Description |
---|---|---|---|
errorCode | Number | N/A | 失败错误码 |
errorMessage | String | N/A | 错误消息(如有) |