public class CloudVprintKernel extends java.lang.Object implements AICloudVprintListener
AICloudVprintListener.AudioToolListener
限定符和类型 | 字段和说明 |
---|---|
protected AIProfile |
profile |
构造器和说明 |
---|
CloudVprintKernel() |
限定符和类型 | 方法和说明 |
---|---|
void |
destroy() |
void |
init(AICloudVprintConfig.Mode mode,
java.lang.String host,
AIProfile profile,
AICloudVprintListener listener)
初始化
|
void |
onClosed(IWebsocket iWebsocket,
int code,
java.lang.String reason) |
void |
onClosing(IWebsocket iWebsocket,
int code,
java.lang.String reason) |
void |
onError(AIError aiError)
返回云端声纹错误码
|
void |
onFailure(IWebsocket iWebsocket,
java.lang.Throwable throwable) |
void |
onInit(int status,
java.lang.String errMsg)
初始化回调
|
void |
onMessage(IWebsocket iWebsocket,
java.lang.String response) |
void |
onOpen(IWebsocket iWebsocket) |
void |
onRegister(int state,
java.lang.String json)
注册回调
|
void |
onUnregister(int state,
java.lang.String json)
注销声纹的回调
|
void |
onVerifyHttp(int state,
java.lang.String json)
Http 方式验证的回调
|
void |
onVerifyWS(java.lang.String message)
WebSocket 方式验证的回调
|
void |
register(AICloudVprintIntent intent)
1.
|
void |
unregister(AICloudVprintIntent intent)
5.
|
void |
verifyCancelWS() |
void |
verifyFeedWS(byte[] data,
int size) |
void |
verifyHttp(AICloudVprintIntent intent)
4.
|
void |
verifyStartWS(AICloudVprintIntent intent) |
void |
verifyStopWS() |
public void init(AICloudVprintConfig.Mode mode, java.lang.String host, AIProfile profile, AICloudVprintListener listener)
mode
- 声纹模式host
- 服务器域名,填空则为默认域名,默认是 https://vpr.duiopen.comprofile
- 授权listener
- 回调public void register(AICloudVprintIntent intent)
intent
- 声纹注册参数public void verifyHttp(AICloudVprintIntent intent)
intent
- 配置参数public void verifyStartWS(AICloudVprintIntent intent)
public void verifyFeedWS(byte[] data, int size)
public void verifyStopWS()
public void verifyCancelWS()
public void onOpen(IWebsocket iWebsocket)
public void onMessage(IWebsocket iWebsocket, java.lang.String response)
public void onClosing(IWebsocket iWebsocket, int code, java.lang.String reason)
public void onClosed(IWebsocket iWebsocket, int code, java.lang.String reason)
public void onFailure(IWebsocket iWebsocket, java.lang.Throwable throwable)
public void unregister(AICloudVprintIntent intent)
intent
- 注销声纹参数public void destroy()
public void onInit(int status, java.lang.String errMsg)
AICloudVprintListener
onInit
在接口中 AICloudVprintListener
status
- 0 成功,其它 异常errMsg
- 错误信息public void onRegister(int state, java.lang.String json)
AICloudVprintListener
onRegister
在接口中 AICloudVprintListener
state
- 状态码json
- 服务器回调的消息public void onVerifyHttp(int state, java.lang.String json)
AICloudVprintListener
onVerifyHttp
在接口中 AICloudVprintListener
state
- 状态码json
- 服务器回调的消息public void onVerifyWS(java.lang.String message)
AICloudVprintListener
onVerifyWS
在接口中 AICloudVprintListener
message
- 验证信息public void onUnregister(int state, java.lang.String json)
AICloudVprintListener
onUnregister
在接口中 AICloudVprintListener
state
- 状态码json
- 服务器回调的消息public void onError(AIError aiError)
AICloudVprintListener
onError
在接口中 AICloudVprintListener
aiError
- 错误码