|
疑似bug反馈
设备类型: |
豹小秘 |
序列号(SN): |
仅管理员可见 |
Core版本: |
1.24.1 |
ROM版本: |
V5.8.2020050100.0672UN |
问题log: |
- |
问题时间点: |
2020年06月24日 15:39 |
问题复现方式: |
运行模版代码,语音“开始巡逻”,在巡逻过程遇到人停下,语音“退出巡逻” |
源代码: |
仅管理员可见 |
企业名称: |
仅管理员可见 |
客户姓名: |
仅管理员可见 |
运行模版代码,语音“开始巡逻”,在巡逻过程遇到人停下,对它说“退出巡逻”,从代码中看,它应该回答“好的,已停止”,并且退出巡逻。但是实际没有退出巡逻,在无人与其对话一段时间过后又开始巡逻。大概看了下log,语音处理已经走到HomeVoice里,这里并未处理退出巡逻,正常应该继续回调下个监听GlobalVoiceTrigger,但是log显示只回调了HomeVoice未回调GlobalVoiceTrigger,请帮忙分析下。问题时间点15:39
HomeVoice.ts
public onListenCallback = (
intent: string,
result: any,
id: any,
text: any
): boolean => {
this.viewModel.resetTimeout();
console.log('HomeVoice',String(intent));
switch (intent) {
case Intent.command_stop:
this.viewModel._voiceTrigger(HomeEvent.stop, result);
return true;
case Intent.command_return:
this.viewModel._voiceTrigger(HomeEvent.return, result);
return true;
case 'MEUI&guide_introduction':
this.viewModel._voiceTrigger(HomeEvent.guide, result);
return true;
case 'register&ask':
//通过下面json拿到姓名
// GlobalVoiceTrigger: ', '{"channel":"","type":3,"result":{"answerTextPlay":true,"card":"{}","intent":"register®ister","queryType":2,"sid":"writing_40d36464-d84b-4360-b7d8-db8924a0d0d7","skillData":"{}","slots":"{\\"start\\":[{\\"dict_name\\":\\"\\",\\"slot_type\\":\\"NORMAL\\",\\"text\\":\\"张三\\",\\"value\\":\\"张三\\"}]}","soundAngle":-1,"userText":"我叫张三"},"eventId":-1}'
let nameValue = result.value;
RegisterUtils.getInstance().setRegisterAsk(true);
return true;
}
return false;
};
GlobalVoiceTrigger.ts
public trigger = (protocol: TriggerProtocol): void => {
console.log('GlobalVoiceTrigger: ', JSON.stringify(protocol));
switch (protocol.result.intent) {
case Intent.command_stop:
case Intent.command_return:
this._trigger(TriggerChannel.wakeUp, protocol);
break;
case Intent.visit:
case Intent.interview:
case Intent.meeting:
//this._trigger('verifyView', protocol);
break;
case Intent.cruise_start:
if (globalModel.isCharting()) {
speechApi.playText(-1, '我正在充电呢,还不能执行此任务');
return;
}
this._trigger('cruise', protocol);
break;
case Intent.cruise_exit: {
console.log('GlobalVoiceTrigger', "cruise_exit : " + triggerManager.getTaskName());
if (triggerManager.getTaskName() === 'cruise') {
triggerManager.clearTask();
speechApi.playText(-1, '好的,已停止');
}
break;
}
|
|