docs.rodeo

MDN Web Docs mirror

SpeechRecognitionErrorEvent: error property

{{APIRef("Web Speech API")}} 

The error read-only property of the {{domxref("SpeechRecognitionErrorEvent")}}  interface returns the type of error raised.

Value

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

Examples

const recognition = new SpeechRecognition();

recognition.onerror = (event) => {
  console.log(`Speech recognition error detected: ${event.error}`);
  console.log(`Additional information: ${event.message}`);
};

Specifications

{{Specifications}} 

Browser compatibility

{{Compat}} 

See also

In this article

View on MDN