2

I'm making an app for the Google Home using the new Actions on Google functionality. Part of my app requires the user to input letter-number pairs such as "P7". However, when testing this with the voice input, Google autocorrects the text to something like "Pizza Oven" before sending it to my app.

Is there a way to hint, or override auto-correct within my Actions On Google conversation?

Brian Ethier
  • 169
  • 3

1 Answers1

0

If you are using api.ai, you can specify that you want two of the parameters to be limited to letters and numbers. The @sys.number and @sys.ordinal entities are defined to limit it to numbers, but you will need to create your own @letter entity consisting of, you guessed it, the letters.

In this screen shot, I've created the @letter entity already, and then defined a couple of example phrases. With the prefix "experiment" in this case, it will return the letter and number pair spoken:

letter number intent

If you test this with something like "experiment random", you may see that it still gets matched, but that the parameters are empty. There are a couple of approaches to this. You can require these parameters - but that would mean that you'd be prompted if you didn't enter the pair. Or you can setup an intent with a lower priority that may match more generally. It may look something like this. (The priority can be set by clicking on the colored dot next to the intent name.)

enter image description here

The @sys.any entity is a wildcard, which should match anything. But since this is a lower priority, it will try to match the letter-number pair one first, and then try this one to see if it matches as a fallback.

Prisoner
  • 49,922
  • 7
  • 53
  • 105
  • 1
    Hey, thanks for taking the time to answer this, however it doesn't solve the issue I was shooting for. I actually have my api.ai setup in this way, but the issue is that when using the Google Home as voice input, the Google Home itself is autocorrecting letter and number combos to words that they sound like. Thus hijacking the true spoken intent. For instance, if the user says "Experiment P 7", Most times the Google Home actually autocorrects this, and sends to api.ai "Experiment Pizza Oven" I need to know how to get Google to not autocorrect, or to know that I'm looking for letter-# – Brian Ethier Dec 22 '16 at 17:19
  • Can you include in your question how you have configured the Intent and any fallback intent setup? The intent I posted correctly distinguishes between "experiment P 7" and "experiment pizza oven", along with all the other letter-number combos that I tried. – Prisoner Dec 22 '16 at 20:55
  • Prisoner: I'm not saying that the intent cannot distinguish between those inputs. I'm asking a more meta question outside the scope of api.ai specifically. I'm how I can get Google Home to stop autocorrecting the speech to dictionary words, and instead let letter-number combos come thru to the back end. Right now Google autocorrects almost all letter-number combos before any backend layer gets a chance to do any parsing etc. Try it yourself, use the microphone and try to say "Move Knight to E 6" It will almost certainly not actually transcribe the correct thing. – Brian Ethier Dec 25 '16 at 03:40