/Web APIs


Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

The error read-only property of the SpeechRecognitionError interface returns the type of error raised.

Note: This SpeechRecognitionError interface was renamed to SpeechRecognitionErrorEvent in the Web Speech API specification.


A DOMString naming the type of error. The possible error types are:


No speech was detected.


Speech input was aborted in some manner, perhaps by some user-agent-specific behavior like a button the user can press to cancel speech input.


Audio capture failed.


Network communication required for completing the recognition failed.


The user agent disallowed any speech input from occurring for reasons of security, privacy or user preference.


The user agent disallowed the requested speech recognition service, either because the user agent doesn't support it or because of reasons of security, privacy or user preference. In this case it would allow another more suitable speech recognition service to be used instead.


There was an error in the speech recognition grammar or semantic tags, or the chosen grammar format or semantic tag format was unsupported.


The language was not supported.


var recognition = new SpeechRecognition();

recognition.onerror = function(event) {
  console.log('Speech recognition error detected: ' + event.error);
  console.log('Additional information: ' + event.message);

Browser compatibility

No compatibility data found for api.SpeechRecognitionError.error.
Check for problems with this page or contribute missing data to mdn/browser-compat-data.

See also

© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.