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