SpeechRecognitionErrorEvent.message

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

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
message
Experimental
Chrome Full support 77Edge Full support 79Firefox No support NoIE No support NoOpera No support NoSafari No support NoWebView Android Full support 77Chrome Android Full support 77Firefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung 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.

Firefox OS permissions

To use speech recognition in an app, you need to specify the following permissions in your manifest:

"permissions": {
  "audio-capture" : {
    "description" : "Audio capture"
  },
  "speech-recognition" : {
    "description" : "Speech recognition"
  }
}

You also need a privileged app, so you need to include this as well:

  "type": "privileged"

See also