类 AICloudASREngine
- java.lang.Object
-
- com.aispeech.export.engines2.AICloudASREngine
-
public class AICloudASREngine extends java.lang.Object云端识别引擎
-
-
字段概要
字段 修饰符和类型 字段 说明 static java.lang.StringTAG
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 voidcancel()取消本次识别操作static AICloudASREnginecreateInstance()创建实例voiddestroy()销毁云端识别引擎voidfeedData(byte[] data, int size)传入数据,在不使用SDK录音机时调用BaseProcessor.EngineStategetCurrentState()获取当前的引擎状态voidinit(AICloudASRConfig config, AIASRListener listener)初始化云端识别引擎voidnotifyWakeup()告知识别引擎已经唤醒,该接口在oneshot功能中使用,内部会记录唤醒的时间点, 之后在vad end的时候来判断到底用户说的是不是唤醒词+指令,还是只有唤醒词protected voidsetLasrInfo(java.lang.String lasrRealtimeParam, java.lang.String lasrRes, java.lang.String lasrForwardAddresses)提供给实时长语音引擎使用voidstart(AICloudASRIntent aICloudASRIntent)启动录音,开始语音识别voidstop()停止录音,等待识别结果
-
-
-
字段详细资料
-
TAG
public static final java.lang.String TAG
- 另请参阅:
- 常量字段值
-
-
方法详细资料
-
createInstance
public static AICloudASREngine createInstance()
创建实例- 返回:
- AICloudASREngine实例
-
init
public void init(AICloudASRConfig config, AIASRListener listener)
初始化云端识别引擎- 参数:
config- 配置listener- 回调接口
-
start
public void start(AICloudASRIntent aICloudASRIntent)
启动录音,开始语音识别- 参数:
aICloudASRIntent- 参数
-
setLasrInfo
protected void setLasrInfo(java.lang.String lasrRealtimeParam, java.lang.String lasrRes, java.lang.String lasrForwardAddresses)提供给实时长语音引擎使用- 参数:
lasrRealtimeParam- lasrRealtimeParamlasrRes- lasrReslasrForwardAddresses- lasrForwardAddresses
-
stop
public void stop()
停止录音,等待识别结果
-
feedData
public void feedData(byte[] data, int size)传入数据,在不使用SDK录音机时调用- 参数:
data- 音频数据流size- 音频数据大小- 另请参阅:
AICloudASRIntent.setUseCustomFeed(boolean)
-
cancel
public void cancel()
取消本次识别操作
-
destroy
public void destroy()
销毁云端识别引擎
-
notifyWakeup
public void notifyWakeup()
告知识别引擎已经唤醒,该接口在oneshot功能中使用,内部会记录唤醒的时间点, 之后在vad end的时候来判断到底用户说的是不是唤醒词+指令,还是只有唤醒词请参考 oneshot demo 中的使用方法
-
getCurrentState
public BaseProcessor.EngineState getCurrentState()
获取当前的引擎状态- 返回:
- EngineState
-
-