So I was looking through the Web Speech API documentation, and I came across this
https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html#speechreco-speechgrammar
Is it possible to use a SpeechGrammar object as a dictionary of words that the api understands?
Yes. That is exactly what it is for. MDN has a description of how to do recognition here:
https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition
And a few open source examples that also make great starter code here:
来源:https://stackoverflow.com/questions/28481339/web-speech-api-speechgrammar