public class AICloudDMEngine extends BaseEngine
mBaseProcessor, TAG, tagSuffix
Modifier and Type | Method and Description |
---|---|
void |
async(MultiModal multiModal)
同步多模态数据
|
static AICloudDMEngine |
createInstance()
创建引擎实例,支持多实例
|
void |
destroy()
销毁云端识别引擎
|
void |
feedback(FeedbackWidget widget)
回复对话结果
|
void |
feedback2PRIVCloud(java.lang.String topic,
java.lang.String data)
终端回复对话结果(注意:该接口仅供私有云来调用)
|
void |
feedData(byte[] data)
传入数据,在不使用SDK录音机时调用
|
java.lang.String |
getTag() |
void |
init(AICloudDMConfig config,
AICloudDMListener listener)
初始化云端识别引擎。
|
boolean |
isConnected()
返回当前连接状态
|
void |
notifyNlgEnd()
外部通知引擎NLG播报已完成
|
void |
notifyVadEnd()
停止录音,等待对话结果 , 使用外部 VAD 场景,在 VAD_END 时调用
|
void |
notifyVadStart()
开始录音, 使用外部 VAD 场景,在 VAD_START 时调用
|
void |
notifyWakeup()
告知识别引擎已经唤醒,该接口在oneshot功能中使用,内部会记录唤醒的时间点,
之后在vad end的时候来判断到底用户说的是不是唤醒词+指令,还是只有唤醒词
|
void |
setExcludeDispatch(AIUpdateListener listener,
java.lang.String[] skillList,
java.lang.String option)
指定技能调度黑名单列表,DM中控调度时对于指定的技能不参与调度
|
void |
setRejectAfterDispatch(AIUpdateListener listener,
java.lang.String[] skillList,
boolean enable)
开启调度后过滤;技能都参与调度,命中技能在该名单中,则过滤该 skillId,如:闲聊
|
void |
start()
创建对话,使用默认的对话配置
|
void |
start(AICloudDMIntent intent)
创建对话
|
void |
stop()
主动结束对话
|
void |
triggerIntent(SkillIntent intent)
主动触发意图
|
void |
triggerIntent(java.lang.String skill,
java.lang.String task,
java.lang.String intent,
java.lang.String slots)
Deprecated.
Use
triggerIntent(SkillIntent) instead. |
void |
updateProductContext(AIUpdateListener listener,
ProductContext context)
更新设备状态,产品级的配置。比如:定位信息,设备硬件状态等
|
void |
updateSkillContext(AIUpdateListener listener,
SkillContext context)
更新技能配置
|
void |
updateVocabs(AIUpdateListener listener,
com.aispeech.export.Vocab... vocabs)
更新词库接口
|
cancel, init, initTAG, parseConfig, parseIntent
public java.lang.String getTag()
getTag
in class BaseEngine
public static AICloudDMEngine createInstance()
AICloudDMEngine
public void init(AICloudDMConfig config, AICloudDMListener listener)
config
- AICloudDMConfig
listener
- 语音识别回调接口public void start(AICloudDMIntent intent)
intent
- AICloudDMIntent
public void start()
start
in class BaseEngine
public void stop()
stop
in class BaseEngine
public void notifyVadStart()
public void notifyVadEnd()
public void feedData(byte[] data)
data
- 音频数据流BaseIntent.setUseCustomFeed(boolean)
public void notifyNlgEnd()
public void destroy()
destroy
in class BaseEngine
public void feedback(FeedbackWidget widget)
widget
- FeedbackWidget
public void feedback2PRIVCloud(java.lang.String topic, java.lang.String data)
topic
- 回复主题data
- 回复结果,为 JSON 字符串public void updateVocabs(AIUpdateListener listener, com.aispeech.export.Vocab... vocabs)
更新指定词库的词条。
listener
- AIUpdateListener
上传词库结果回调监听vocabs
- Vocab
需要更新的词库列表public void updateProductContext(AIUpdateListener listener, ProductContext context)
listener
- AIUpdateListener
context
- ProductContext
public void updateSkillContext(AIUpdateListener listener, SkillContext context)
listener
- AIUpdateListener
context
- SkillContext
public void triggerIntent(SkillIntent intent)
intent
- SkillIntent
public void triggerIntent(java.lang.String skill, java.lang.String task, java.lang.String intent, java.lang.String slots)
triggerIntent(SkillIntent)
instead.skill
- 技能名称, 必填task
- 任务名称, 必填intent
- 意图名称, 必填slots
- 语义槽, key-value Json, 可选public void async(MultiModal multiModal)
multiModal
- MultiModal
public void setExcludeDispatch(AIUpdateListener listener, java.lang.String[] skillList, java.lang.String option)
listener
- AIUpdateListener
skillList
- 过滤技能列表option
- 操作类型ProductContext.OPTION_SET
,
ProductContext.OPTION_DELETE
public void setRejectAfterDispatch(AIUpdateListener listener, java.lang.String[] skillList, boolean enable)
listener
- AIUpdateListener
skillList
- 过滤技能列表enable
- 是否开启拒识过滤开关 true 开启,false 关闭public void notifyWakeup()
public boolean isConnected()