This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
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.
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.
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?
'service' does make sense.
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.