New issue
Advanced search Search tips

Issue 680944 link

Starred by 7 users

Issue metadata

Status: Unconfirmed
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug
Team-Accessibility



Sign in to add a comment

Speech recognition API does not use a specified grammar in actual recognition

Reported by neophyto...@gmail.com, Jan 13 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36

Steps to reproduce the problem:
1. Create new webkitSpeechRecognition object (R)
2. Create JSGF grammar string (G)
3. Create new webkitSpeechGrammarList object (L)
4. Add G to L 
5. Add L to R
6. Try speech recognition

What is the expected behavior?
The specified JSGF grammar is a list of 4 words (commands).
The speech recognizer should limit its recognition to only these 4 words and raise the "onnomatch" event for words outside the defined grammar.  

What went wrong?
The speech recognizer seems to continue to act without considering the specified grammar.
The "onnomatch" event is not fired for spoken words outside the grammar.

Did this work before? No 

Does this work in other browsers? N/A

Chrome version: 55.0.2883.87  Channel: stable
OS Version: 10.0
Flash Version: Shockwave Flash 24.0 r0

I am not sure whether Chrome currently supports grammar in the actual recognition process (maybe it only allows specifying a grammar). I do need however to run a project with such requirements. Can Chrome in anyway support this requirement?
 
SpeechError.txt
3.9 KB View Download

Comment 1 by ajha@chromium.org, Jan 16 2017

Labels: Needs-Triage-M55
Cc: kkaluri@chromium.org
Labels: Needs-Feedback
neophytos.karamanos@ in order triage this issue could you please help us with the sample url and tool used for speech recognition, so that we reproduce it on our end.
Hi,
The JavaScript code which I attached to my original append shows how the calls are made and the specific parameters used. I am only using the standard Chrome Speech Recognition API. No other tool is involved. To my understanding, Chrome contacts back end Google servers for the actual recognition but this this all shielded and not visible to us. Please let me know if anything additional is needed. 
Project Member

Comment 4 by sheriffbot@chromium.org, Jan 25 2017

Labels: -Needs-Feedback Needs-Review
Owner: kkaluri@chromium.org
Thank you for providing more feedback. Adding requester "kkaluri@chromium.org" for another review and adding "Needs-Review" label for tracking.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 5 by cda...@chromium.org, Mar 13 2017

Cleaning up "Needs-Review" label as we are not using this label for triage. Ref  bug 684919 

Comment 6 by cda...@chromium.org, Mar 13 2017

Labels: -Needs-Review
Any news on getting this fixed? I'm have experienced the same issue on chrome 56, 57 and 58 (mac)
Any update on this issue please?

Comment 9 by fraruc...@gmail.com, Jul 12 2017

I would also be very interested in this feature, any update would be appreciated. Thanks
I haven't been able to get grammar to work either. My guess is grammar is ignored.

I tried a version of Mozilla's Speech Color Changer (https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_API/Using_the_Web_Speech_API). It builds a JSGF string and then adds it to the SpeechGrammarList with .addFromString(). It would recognize colors that were not in the grammar without calling onnomatch.

Since that didn't work, I tried a version using an SRGS XML grammar. I was guessing that Chrome was using an MRCPv2 server that should support SRGS. It didn't work, but I noticed that the SpeechGrammar.src URI was "data:application/xml,...". I changed it to "data:application/srgs+xml,...", but that didn't work either.

Looking back, the JSGF grammar is also a "data:application/xml,..." URI. (.addFromString() always uses "application/xml" MIME type.) It should probably be "data:application/jsgf" or "data:application/x-jsgf "because JSGF is not XML. I haven't tried changing the src URI to those values.
For completeness, tried editing the JSGF data: MIME type with

grammarlist[0].src = grammarlist[0].src.replace("application/xml", "application/jsgf");

but it did not work. Also tried "application/x-jsgf" and "text/jsgf" without success.

If grammar is working, then it is not taking data: URIs.

Also failed using <speech-context> grammar.

https://www.unimrcp.org/manuals/pdf/GoogleSRUsageManual.pdf

(which should be "application/xml").
Components: UI>Accessibility
Labels: TE-NeedsTriageHelp
Owner: ----
Unable to triage this issue from TE-End, hence adding TE-NeedsTriageHelp label for further triage.
I can confirm that the grammar doesn't work with Version 66.0.3359.181 (Official Build) (64-bit)

Cc: lpalmaro@chromium.org dmazz...@chromium.org
Dmazzoni@, lpalmaro@ do you know who could help?

Sign in to add a comment