KAsrSDK-全局事件接口

函数

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

识别到文本结果通知

参数
result文本结果

◆ onRelease()

abstract void onRelease ( int  result)
abstract

资源释放回调

参数
result0:成功

◆ onStart()

abstract void onStart ( int  result,
String  sessionId 
)
abstract

开始会话回调

参数
result0:成功 -1:参数错误 -2:重复注册 -3:网络异常 -4:token校验失败
sessionId会话id,排查问题可与服务端对应.

◆ onStop()

abstract void onStop ( int  result)
abstract

停止会话回调

参数
result0:成功 -1:网络异常

◆ onWarning()

abstract void onWarning ( int  warningType,
String  content 
)
abstract

警告回调

参数
warningType警告类型
content警告信息