I read through the W3C docs about this, and I think the user words are taken from the user grammar, but I tried to go to this demo and entered the following javascript on the console:
recognition.grammars.addFromString('foo');
Which works fine, but recognition.grammars[0].src returns: "data:application/xml,foo"
Note : "foo" is not the word that interests me, but the word that interests me is not an English word, using "foo" as an example. When I usually say my usual word, he thinks that I am saying something else (which makes sense). I use "foo" here to protect my brand :)
So I want to say “Hey foo”, similar to how “Good Google” works. But my word "foo" is not an actual word, so SpeechRecognitionResult does not have my custom word.
I don’t understand how to add custom words, or is it impossible today?
javascript html5 w3c speech-recognition speech-to-text
kentcdodds
source share