files/en-us/web/api/speechrecognitionerrorevent/index.md
{{APIRef("Web Speech API")}}
The SpeechRecognitionErrorEvent interface of the Web Speech API represents error messages from the recognition service.
{{InheritanceDiagram}}
SpeechRecognitionErrorEvent object.SpeechRecognitionErrorEvent also inherits properties from its parent interface, {{domxref("Event")}}.
const recognition = new SpeechRecognition();
recognition.onerror = (event) => {
console.log(`Speech recognition error detected: ${event.error}`);
console.log(`Additional information: ${event.message}`);
};
{{Specifications}}
{{Compat}}