public class AICloudASREngine
extends java.lang.Object
限定符和类型 | 字段和说明 |
---|---|
static java.lang.String |
TAG |
限定符和类型 | 方法和说明 |
---|---|
void |
cancel()
取消本次识别操作
|
static AICloudASREngine |
createInstance()
创建实例
|
void |
destroy()
销毁云端识别引擎
|
void |
feedData(byte[] data,
int size)
传入数据,在不使用SDK录音机时调用
|
void |
init(AICloudASRConfig config,
AIASRListener listener)
初始化云端识别引擎
|
void |
notifyWakeup()
告知识别引擎已经唤醒,该接口在oneshot功能中使用,内部会记录唤醒的时间点,
之后在vad end的时候来判断到底用户说的是不是唤醒词+指令,还是只有唤醒词
请参考 oneshot demo 中的使用方法
|
void |
start(AICloudASRIntent aICloudASRIntent)
启动录音,开始语音识别
|
void |
stop()
停止录音,等待识别结果
|
public static final java.lang.String TAG
public static AICloudASREngine createInstance()
public void init(AICloudASRConfig config, AIASRListener listener)
config
- 配置listener
- 回调接口public void start(AICloudASRIntent aICloudASRIntent)
aICloudASRIntent
- 参数public void stop()
public void feedData(byte[] data, int size)
data
- 音频数据流size
- 音频数据大小AICloudASRIntent.setUseCustomFeed(boolean)
public void cancel()
public void destroy()
public void notifyWakeup()
请参考 oneshot demo 中的使用方法