Web Speech API ignores JSGF grammar set for SpeechRecognition
Reported by
swirl...@gmail.com,
Jan 8 2018
|
|||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/63.0.3239.84 Chrome/63.0.3239.84 Safari/537.36 Steps to reproduce the problem: 1. Click on the page with microphone enabled 2. Say anything in English 3. Look at the diagnostics messages at the bottom of the page What is the expected behavior? Only the words should be recognized set in the grammar and not everything you say What went wrong? Whatever you tell it, it recognizes. Not just those colors defined in the grammar. As if the grammar wouldn't be there at all. Did this work before? N/A Does this work in other browsers? N/A Chrome version: 63.0.3239.84 Channel: stable OS Version: Ubuntu 17.10 Flash Version: no flash The attachment contains the code of a live demo (http://mdn.github.io/web-speech-api/speech-color-changer/) made my Mozilla. Source code available here: https://github.com/mdn/web-speech-api/tree/master/speech-color-changer
,
Jan 19 2018
swirlsky@ Thanks for the issue. Tested this issue on Ubuntu 17.10 on the latest Stable 63.0.3239.132 by following the below steps. 1. Launched Chrome and plugged in Microphone to the system. 2. Opened the given html page and there is no popup shown to allow the microphone. 3. On the right top of the page, allowed access to microphone and reloaded the page. 4. On clicking on any colour and speaking out the colour name, an error is observed at the bottom of the page "Error occurred in recognition: not-allowed" and the page is blocking the microphone access. Attached is the screen shot for reference. Request you to please check and confirm if anything is missed from our end in reproducing the issue. Also request you to please upgrade chrome to the latest Stable 63.0.3239.132, retry the issue and update the thread with the behavior. Thanks..
,
Jan 24 2018
Please try it over https instead of http. For some reason chrome doesn't let the page to access the microphone if the connection is not secure. So the steps are: 1. Open https://mdn.github.io/web-speech-api/speech-color-changer/ 2. Click anywhere on the page ("Ready to receive a color command" is displayed on the console.) 3. Say something 4. See on the bottom of the page that it recognizes anything you said, not only the words set in the JSGF grammar.
,
Jan 24 2018
Thank you for providing more feedback. Adding requester "susanjunia.boorgula@techmahindra.com" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Feb 1 2018
Note, I would expect the grammar to improve words recognized (eg names) vs a strict dictionary of what can be said.
,
Feb 17 2018
Consider a scenario when there's only a small set of words being relevant for the recognition (e.g. a voice-controlled navigation on an application's UI, for example you want to tell the program which menu item to select). In cases like that, defining a grammar could vastly improve the accuracy of the recognition, because the engine doesn't have to consider a million options when trying to figure it out what you said, only those let's say 10+ words you defined in the grammar. An example: Imagine you're voice-controlling a robot. It can do two things with an object. Raise or lower it. Accordingly, the two commands are "lower" and "raise". Whey you say the word "lower", it works pretty well, it understands almost every time what you said. But when you say "raise", it does nothing. Why? Because the `confidence` of the `SpeechRecognitionResult` is very low for "raise", as there is no context and the engine cannot identify whether you said "raise", "rays", "rase", "raze", "rehs", or some other very similar word it has to consider... Now, for the English language it performs already pretty well. But there are a hundred of other languages supported by the speech recognition, for which this is a serious problem, which however could easily be fixed if the api would support the grammars.
,
May 25 2018
swirlsky@ - Could you please upgrade chrome to latest stable #66.0.3359.181 and please let us know if the issue still persists or not. Thanks...!!
,
Jul 31
Sorry for the late reply. Right now I'm checking it (https://mdn.github.io/web-speech-api/speech-color-changer/) with Chromium Version 67.0.3396.99 (Official Build) Built on Ubuntu ,running on Ubuntu 18.04 (64-bit) And now it doesn't work at all unfortunately. The diagnostic message at the bottom of the page says: "Error occurred in recognition: network"
,
Jul 31
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Aug 1
Ignore my previous message, the Chrome I was using had problems, that's why the recognition wasn't working at all. Now I tried it with a proper instance (version 68) and the results are still the same, nothing changed. Whatever you say, it recognises. diagnostic.textContent = 'Result received: ' + color + '.'; can produce for example the following output on the bottom of the page: Result received: laptop.
,
Sep 24
I have met the save problem. macOS version: 10.13.6 Chrome version: 69.0.3497.92 (Official Build) (64-bit) Grammar set is a very useful skill for designing a robot base voice-controlling, just like swirl... said. Hope it would be better.
,
Dec 10
I'm seeing the same issue. It doesn't seem to be supported even though the API is exposed. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by krajshree@chromium.org
, Jan 8 2018