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