I'm using SpeechRecognition under Chromium (an interface of the Web Speech API) and have a grammar set for the recognition, defined in JSGF:
"#JSGF V1.0 UTF-8; grammar animal_list; public <animal> = dog | cat | horse ;"
It is successfully added to the recognition, so I would except that it would only return one of the three words (dog, cat, or horse) when I speak, but instead it continues to recognize anything I say.
First I thought the issue was with my code, but then I found that Mozilla made a live demo that illustrates this very use case of the API: You tell something, and if it is one of the colors defined in the grammar, the API recognizes it. This is how it was supposed to work I think.
But look at the bottom of the page for diagnostics messages: Whatever you tell it, it recognizes. Not just those colors defined in the grammar. As if the grammar wouldn't be there at all.
What do you think, should I report this as a bug of Chrome/Chromium and if so, where? Or do I misunderstand something how it is to work?