类 AILocalASREngine
- java.lang.Object
-
- com.aispeech.export.engines2.AILocalASREngine
-
public class AILocalASREngine extends java.lang.Object本地识别
-
-
字段概要
字段 修饰符和类型 字段 说明 static java.lang.StringTAG
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 voidcancel()取消本次识别操作static AILocalASREnginecreateInstance()voiddestroy()销毁本地识别引擎voidfeed(byte[] data)传入数据,在不使用SDK内部录音机时调用voidfeedData(byte[] data, int size)传入数据,在不使用SDK内部录音机时调用voidinit(AILocalASRConfig config, AIASRListener listener)初始化本地识别引擎voidnotifyWakeup()告知识别引擎已经唤醒,该接口在oneshot功能中使用,内部会记录唤醒的时间点, 之后在vad end的时候来判断到底用户说的是不是唤醒词+指令,还是只有唤醒词voidsetWakeupWords(java.lang.String[] wakeupWords)设置唤醒词列表,用于oneshot过滤唤醒词voidstart(AILocalASRIntent aiLocalASRIntent)启动录音,开始语音识别voidstop()停止录音,等待识别结果voidupdateDecoder(AIUpdateListener updateListener, com.aispeech.export.engines2.bean.Decoder... decoders)voidupdateNetBinPath(java.lang.String netBinPath, AIUpdateListener listener)更新编译 xbnf 后的 netBinvoidupdateVocab(com.aispeech.export.Vocab vocab, AIUpdateListener updateListener)voidupdateVocabs(AIUpdateListener updateListener, com.aispeech.export.Vocab... vocabs)更新单个或者多个词库
-
-
-
字段详细资料
-
TAG
public static final java.lang.String TAG
- 另请参阅:
- 常量字段值
-
-
方法详细资料
-
createInstance
public static AILocalASREngine createInstance()
-
notifyWakeup
public void notifyWakeup()
告知识别引擎已经唤醒,该接口在oneshot功能中使用,内部会记录唤醒的时间点, 之后在vad end的时候来判断到底用户说的是不是唤醒词+指令,还是只有唤醒词请参考 oneshot demo 中的使用方法
-
updateNetBinPath
public void updateNetBinPath(java.lang.String netBinPath, AIUpdateListener listener)更新编译 xbnf 后的 netBin- 参数:
listener- 更新接口回调AIUpdateListenernetBinPath- net.bin 资源自定义路径
-
init
public void init(AILocalASRConfig config, AIASRListener listener)
初始化本地识别引擎- 参数:
config- 配置信息listener- 回调接口
-
setWakeupWords
public void setWakeupWords(java.lang.String[] wakeupWords)
设置唤醒词列表,用于oneshot过滤唤醒词- 参数:
wakeupWords- 唤醒词列表
-
start
public void start(AILocalASRIntent aiLocalASRIntent)
启动录音,开始语音识别- 参数:
aiLocalASRIntent- 参数
-
feed
public void feed(byte[] data)
传入数据,在不使用SDK内部录音机时调用- 参数:
data- 音频数据流- 另请参阅:
AILocalASRIntent.setUseCustomFeed(boolean)
-
feedData
public void feedData(byte[] data, int size)传入数据,在不使用SDK内部录音机时调用- 参数:
data- 音频数据流size- 数据大小- 另请参阅:
AILocalASRIntent.setUseCustomFeed(boolean)
-
stop
public void stop()
停止录音,等待识别结果
-
cancel
public void cancel()
取消本次识别操作
-
destroy
public void destroy()
销毁本地识别引擎
-
updateVocab
public void updateVocab(com.aispeech.export.Vocab vocab, AIUpdateListener updateListener)
-
updateVocabs
public void updateVocabs(AIUpdateListener updateListener, com.aispeech.export.Vocab... vocabs)
更新单个或者多个词库- 参数:
updateListener- 更新结果回调vocabs- 词库内容
-
updateDecoder
public void updateDecoder(AIUpdateListener updateListener, com.aispeech.export.engines2.bean.Decoder... decoders)
-
-