Search code examples
dialogflow-esactions-on-google

Working on simulator but not working on the Google Home


I am building an app using dialogflow and 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.

The only way this ID is working on the Google Home is when I say one hundred twenty three thousand four hundred fifty six. Can you please help me on how can I say 123456(one two three four five six) and it works on Google Home also?


Solution

  • When you use an action through Google Home you will get spaces in between words or numbers when you pause while speaking. Because this is done by Google Home itself, there is very little you can do about it from Dialogflow's side.

    One solution that I always use when I face this issue is to remove any spaces using a regex. To do this, you do require a webhook and the knowledge on how to create a regex that removes these spaces.