简体   繁体   English

DialogFlow谷歌家庭助手不断收听,不会暂停

[英]DialogFlow google Home Assistant keeps listening, does not pause

I have created a chat bot which responds to request.This is the flow currently happening: 我创建了一个聊天机器人来响应请求,这是当前正在发生的流程:

  1. I say "Talk to My Test App" 我说“与我的测试应用对话”
  2. My app starts and says welcome message. 我的应用程序启动并显示欢迎消息。
  3. I request something and my intent is fulfilled 我要求一些东西,我的意图实现了

After this the Google Home does not pause but keeps on listening. 此后,Google Home不会暂停,但会继续监听。 If I stop it then again I will have to say "Talk to My Test App", which I also don't want. 如果我停止了,那么我将不得不说“与我的测试应用对话”,这也是我所不希望的。

I want google home to sleep after fulfilment. 我希望Google家在实现后能够入睡。 and Awake in the same app when I say "Ok Google" 当我说“ Ok Google”时,在同一应用中唤醒

More details:- In my use case the user will talk to the app frequently, for example after every 30 seconds-2mins. 更多详细信息:-在我的用例中,用户将频繁与该应用进行对话,例如,每30秒2分钟之后。 I don't want him to say every time "Hey Google" to wake up and then "Talk to My App" and then the command. 我不希望他每次都说“ Hey Google”,然后再说“ Talk to My App”和命令。 I also don't want to say long sentence after waking up the Google Home like "Talk to My App to Do this".So I thought it would be better that my app doesn't stop by ending the conversation, instead it should be paused.So that the user can just wake up Google Home and directly pass the command. 我也不想在唤醒Google Home之后说“与我的应用对话以执行此操作”这样的长句。因此,我认为我的应用最好不要以结束对话而停止,而应该是暂停。以便用户可以唤醒Google Home并直接传递命令。

Currently Google Home does not pause after the first command and keeps on listening surrounding sounds and responds to the noise, because of this issue user has to stop it. 当前,在第一个命令之后Google Home不会暂停,而是继续听周围的声音并响应噪音,因为这个问题,用户必须将其停止。

As the name suggests, a conversational VUI suggests that you're going to have a conversation with the agent. 顾名思义,对话式VUI建议您与座席进行对话。 Not something with long pauses in between. 之间没有长时间停顿的东西。 The assumption is that if there is no reply, that the user isn't actively engaging in the conversation. 假设是,如果没有答复,则表明用户没有积极参与对话。 There is no direct feature that does what you want, although there are a couple of interesting workarounds that might work for you. 尽管有一些有趣的解决方法可能对您有用,但是没有直接功能可以满足您的需求。

First, as you suggest, deep linking with a phrase such as "Hey Google, ask My App to Do This" is certainly a possible approach, and one that you should support. 首先,正如您所建议的那样,使用诸如“嘿Google,请我的应用程序执行此操作”之类的短语进行深层链接肯定是一种可能的方法,并且您应该支持这种方法。 In production, and as a user uses it more, the introduction and hand-off from Google gets shorter and shorter. 在生产中,随着用户使用它的增多,来自Google的介绍和交付越来越短。 Even the launch phrase can be shortened with the user creating a Shortcut - but this is a choice of the user, not you. 用户创建快捷方式,甚至可以缩短启动短语-但这是用户的选择,而不是您自己。

Although there is no way to "pause" a conversation, there is a way to have the reply include streaming audio that the user can interrupt. 尽管没有办法“暂停”对话,但是有一种方法可以使答复包含用户可以中断的流音频。 Using a Media Response begins playing that media. 使用媒体响应开始播放该媒体。

  • When the URL pointed to by the media ends, your Action gets a callback (via an Event in Dialogflow or an Intent with actions.json) indicating the media has ended, and you can do something like play another Media Response, and continue to do this as long as appropriate. 当媒体指向的URL结束时,您的操作会收到一个回调(通过Dialogflow中的事件或具有actions.json的Intent),表明媒体已结束,您可以执行诸如播放另一个媒体响应之类的操作,然后继续执行操作这个只要合适。

  • Are any time, your user can interrupt the audio by saying "Hey Google" and some command. 任何时候,您的用户都可以通过说“嘿Google”和一些命令来中断音频。 This will trigger any matching Intent, as if they said a command as usual. 这将触发任何匹配的Intent,就像他们照常说的那样。

There are some caveats with this scheme - some commands don't actually work (anything with "next" in it, for example, since that sounds more like a media command that isn't implemented), and you need an audio of reasonable length that won't be distracting in your environment, but this might be a reasonable solution to your scenario. 此方案有一些警告-一些命令实际上不起作用(例如,其中任何带有“ next”的命令,因为听起来更像是未实现的媒体命令),并且您需要合理长度的音频在您的环境中不会分散您的注意力,但这可能是您的方案的合理解决方案。

If you want to exit the conversation you may do the following: 如果要退出对话,可以执行以下操作:

  1. Go to the dialogflow console. 转到dialogflow控制台。
  2. Create and intent (say goodbye). 创造和意图(说再见)。
  3. In the Event section, enter ' actions_intent_CANCEL ' in the add event field. 在“事件”部分的“添加事件”字段中输入“ actions_intent_CANCEL ”。
  4. Enter your Training Phrases. 输入您的训练短语。 (Say exit, stop, pause etc) (说退出,停止,暂停等)
  5. Enter your greetings (say goodbye) in text response. 在文字回复中输入您的问候(说再见)。 You may skip this if you don't want to reply. 如果您不想回复,则可以跳过此步骤。
  6. Enable ' Set this intent as end of conversation '. 启用“ 将此意图设置为对话结束 ”。
  7. Save

I needed to have a pause so I can narrate my thoughts but not exit my conversation for a client demo, so I added this in DialogFlow's text response, with a very long break at the end of each text response. 我需要暂停一下,以便能够叙述自己的想法,但不能退出客户端演示的对话,因此我在DialogFlow的文本响应中添加了此内容,每个文本响应的末尾都有很长的间隔。 I can then interrupt the pause with "Okay Google" and stay within my conversion. 然后,我可以使用“确定Google”中断暂停,并保持转换的状态。

<speak>This is a sentence with a <break time="600s"/> pause</speak>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM