简体   繁体   English

在模拟器上工作但不在 Google Home 上工作

[英]Working on simulator but not working on the Google Home

I am building an app using dialogflow and actions-on-google.我正在使用 dialogflow 和 actions-on-google 构建一个应用程序。 When I invoke my app using the Google Home, the first response from the code is that "What is your survey ID" and when I say 123456(one two three four five six), it sometimes interprets it as 123 456 and sometimes anything else, but when I say 123456(one two three four five six) on the dialogflow simulator it works perfectly fine.当我使用 Google Home 调用我的应用程序时,代码的第一个响应是“您的调查 ID 是什么”,当我说 123456(一二三四五六)时,它有时会将其解释为 123 456,有时会解释为其他任何内容,但是当我在对话流模拟器上说 123456(一二三四五六)时,它工作得很好。

The only way this ID is working on the Google Home is when I say one hundred twenty three thousand four hundred fifty six.这个 ID 在 Google Home 上工作的唯一方式是当我说 123456 时。 Can you please help me on how can I say 123456(one two three four five six) and it works on Google Home also?你能帮我说 123456(一二三四五六),它也适用于 Google Home 吗?

When you use an action through Google Home you will get spaces in between words or numbers when you pause while speaking.当您通过 Google Home 使用某个操作时,您会在说话时暂停时在单词或数字之间出现空格。 Because this is done by Google Home itself, there is very little you can do about it from Dialogflow's side.因为这是由 Google Home 自己完成的,所以您在 Dialogflow 方面几乎无能为力。

One solution that I always use when I face this issue is to remove any spaces using a regex .当我遇到这个问题时,我总是使用的一种解决方案是使用regex删除任何空格。 To do this, you do require a webhook and the knowledge on how to create a regex that removes these spaces.为此,您确实需要一个webhook和有关如何创建删除这些空格的正则表达式的知识。

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

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