This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 20687 - SpeechRecognitionError should have 'service-error'
Summary: SpeechRecognitionError should have 'service-error'
Status: RESOLVED WONTFIX
Alias: None
Product: Speech API
Classification: Unclassified
Component: Speech API (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Glen Shires
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-16 22:48 UTC by Nikhil
Modified: 2018-08-06 10:38 UTC (History)
1 user (show)

See Also:


Attachments

Description Nikhil 2013-01-16 22:48:01 UTC
There can be several service specific errors that can happen, for example, the service is an HTTP server which returned a response that the client could not parse, or the service.

To handle this the error field should have another value of 'service-error' where the textual description can report the actual error.
Comment 1 Glen Shires 2013-01-31 19:34:55 UTC
I agree.

I think it's important for the JavaScript to be able to determine a reasonable course of action based on the SpeechRecognitionError.error (because it should not have to parse the SpeechRecognitionError.message -- as that string is intended only for humans to interpret as a helpful debugging aid).

So my thinking is that

"network" indicates that most likely the client doesn't have a connection to the internet -- and thus no remote services are available.  A reasonable course-of-action for the JavaScript app is to select (or prompt user for) a local service -- or prompt user to obtain a connection to the internet.

"service-not-allowed" indicates that most likely this specific remote service can't be used unless/until the user/admin changes some preference/security setting -- however other remote services may be available.  A reasonable course-of-action for the JavaScript app is to prompt user to change settings or select another service.

"service-error" indicates that most likely this specific remote service can't be used (at least, not at the moment, and there's nothing the user/admin can do to fix that) -- however other remote services may be available.  A reasonable course-of-action for the JavaScript app is to select (or prompt user for) another service.
Comment 2 Glen Shires 2013-02-06 16:23:47 UTC
It would be good to hear additional opinions on this.

Also, I believe that SpeechRecognitionError "service-error" is redundant, and that it should instead be simply "service", analogous to other SpeechRecognitionErrors like "network" and "audio-capture".  Thoughts?
Comment 3 Nikhil 2013-02-06 18:06:54 UTC
'service' does make sense.
Comment 4 Philip Jägenstedt 2018-08-06 10:38:01 UTC
It's been over 5 years and no feedback. The error codes supported by Chrome are here:
https://cs.chromium.org/chromium/src/third_party/blink/renderer/modules/speech/speech_recognition_error.cc?l=31&rcl=6c31ebb1731286021b3447e4d56fdd7b0d011bb2

If another implementer would like to add more fields, please file a new issue at https://github.com/w3c/speech-api/issues to discuss.