This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The message
read-only property of the SpeechRecognitionErrorEvent
interface returns a message describing the error in more detail.
Syntax
var myErrorMsg = event.message;
Value
A DOMString
containing more details about the error that was raised. Note that the spec does not define the exact wording of these messages — this is up to the implementors to decide upon.
Examples
var recognition = new SpeechRecognition(); recognition.onerror = function(event) { console.log('Speech recognition error detected: ' + event.error); console.log('Additional information: ' + event.message); }
Specifications
Specification | Status | Comment |
---|---|---|
Web Speech API The definition of 'message' in that specification. |
Draft |
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
message | Chrome Full support 77 | Edge Full support 79 | Firefox No support No | IE No support No | Opera No support No | Safari No support No | WebView Android Full support 77 | Chrome Android Full support 77 | Firefox Android No support No | Opera Android No support No | Safari iOS No support No | Samsung Internet Android Full support 12.0 |
Legend
- Full support
- Full support
- No support
- No support
- Experimental. Expect behavior to change in the future.
- Experimental. Expect behavior to change in the future.