|
abstract void | onWarning (int warningType, String content) |
|
abstract void | onError (int errorType, String content) |
|
abstract void | onRelease (int result) |
|
abstract void | onStart (int result, String sessionId) |
|
abstract void | onRecogResult (KAsrRecogResult result) |
|
abstract void | onStop (int result) |
|
KAsrSDK 全局回调接口,所有的事件都包括在内。
◆ onError()
abstract void onError |
( |
int |
errorType, |
|
|
String |
content |
|
) |
| |
|
abstract |
错误回调
- 参数
-
errorType | 错误类型 |
content | 错误信息 |
◆ onRecogResult()
abstract void onRecogResult |
( |
KAsrRecogResult |
result | ) |
|
|
abstract |
◆ onRelease()
abstract void onRelease |
( |
int |
result | ) |
|
|
abstract |
◆ onStart()
abstract void onStart |
( |
int |
result, |
|
|
String |
sessionId |
|
) |
| |
|
abstract |
开始会话回调
- 参数
-
result | 0:成功 -1:参数错误 -2:重复注册 -3:网络异常 -4:token校验失败 |
sessionId | 会话id,排查问题可与服务端对应. |
◆ onStop()
abstract void onStop |
( |
int |
result | ) |
|
|
abstract |
◆ onWarning()
abstract void onWarning |
( |
int |
warningType, |
|
|
String |
content |
|
) |
| |
|
abstract |
警告回调
- 参数
-
warningType | 警告类型 |
content | 警告信息 |