类 AILocalASREngine
- java.lang.Object
-
- com.aispeech.export.engines2.AILocalASREngine
-
public class AILocalASREngine extends java.lang.Object
本地识别
-
-
字段概要
字段 修饰符和类型 字段 说明 static java.lang.String
TAG
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 void
cancel()
取消本次识别操作static AILocalASREngine
createInstance()
void
destroy()
销毁本地识别引擎void
feed(byte[] data)
传入数据,在不使用SDK内部录音机时调用void
feedData(byte[] data, int size)
传入数据,在不使用SDK内部录音机时调用void
init(AILocalASRConfig config, AIASRListener listener)
初始化本地识别引擎void
notifyWakeup()
告知识别引擎已经唤醒,该接口在oneshot功能中使用,内部会记录唤醒的时间点, 之后在vad end的时候来判断到底用户说的是不是唤醒词+指令,还是只有唤醒词void
setWakeupWords(java.lang.String[] wakeupWords)
设置唤醒词列表,用于oneshot过滤唤醒词void
start(AILocalASRIntent aiLocalASRIntent)
启动录音,开始语音识别void
stop()
停止录音,等待识别结果void
updateDecoder(AIUpdateListener updateListener, com.aispeech.export.engines2.bean.Decoder... decoders)
void
updateNetBinPath(java.lang.String netBinPath, AIUpdateListener listener)
更新编译 xbnf 后的 netBinvoid
updateVocab(com.aispeech.export.Vocab vocab, AIUpdateListener updateListener)
void
updateVocabs(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
- 更新接口回调AIUpdateListener
netBinPath
- 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)
-
-