3

Don't know if it's the good place to ask that question but i'm making my own action for google assistant. Users need to spell some word with letters and numbers (like RJ34343KR). In dialogflow side, all is okay, i defined a regexp entity and it seems working when i use keyboard to ask question to my assistant.

But when i speak, google assistant is not able to understand that I spell letter. No problem for numbers. I try to spell : "RU304304" and it gives : "Are you 3 0 4 3 0 4".

Don't know if it matters but my assistant language is french (i give you an example in english for better understanding)

I do not find anything in the doc. Except that link

Anyone can help me on this ?

Thanks !

MC

Edit after the Google assistant support reply :

Here is the answer from Google :

For speech recognition in Google Assistant, it can only transcribed words or phrases that are language supported. It appears that "RU304304" input is not a word so it recognized "RU" as "are you". What you can do is to implement suggestion chips for this response or type the code in keyboard. For more information about suggestion chip, please check this documentation.

So it seems pretty clear, no way to spell letters to google home. It's like a big limitation is it ?

Community
  • 1
  • 1
godo57
  • 508
  • 2
  • 24
  • Does your regex take in account pauses in voice input? If you pause when you talk to Google Assistant, Google will add spaces to your input. "3 0 4 3 0 4" is an example of this. This might affect entity detection when using the Google Assistant. – Jordi Oct 22 '19 at 14:14
  • Thanks for your comment. In fact, my regex takes that in account. The problem is before that. Like i said, when I type R J 3 4 3 4 3 K R : no problem. When i spell it, google assistant try to transform sound to words instead of letters. – godo57 Oct 22 '19 at 14:19

1 Answers1

1

I've encountered this problem aswell in an older project when I used a sys.any entity to look for a product code in user input. The work around that I used was change certain words that Google changed to words back to characters or symbols.

function customReplace(serial) {
      let converted = serial.replace("are", "R");
      converted = converted.replace("bee", "B");
      converted = converted.replace("for", "4");
      converted = converted.replace("slash", "/");
      return converted;
    }

I do recommend to only use this in the handler where you want the product codes, because this code will change other input such as "That was for bob too" into "That was 4 bob 2" and that might mess with your responses.

Jordi
  • 3,041
  • 5
  • 17
  • 36
  • Thanks for your suggestion. In my case, numbers are working well. The problem is for letters. I expect to have some alternatives than your workaround because i don't want to add 26 lines (one per letter) of code. Cheerz ! – godo57 Oct 22 '19 at 14:42