SpeechRecognitionError

この記事はまだボランティアによって 日本語 に翻訳されていません。ぜひ MDN に参加して翻訳を手伝ってください!
この記事を English (US) で読むこともできます。

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The SpeechRecognitionError interface of the Web Speech API represents error messages from the recognition service.

Properties

SpeechRecognitionError also inherits properties from its parent interface, Event.

SpeechRecognitionError.error Read only
Returns the type of error raised.
SpeechRecognitionError.message Read only
Returns a message describing the error in more detail.

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 'SpeechRecognitionError' in that specification.
Draft  

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support33 webkit 1 ? No No No No
error33 webkit 1 ? No No No No
Basic support33 webkit 1 ? No No No No
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support Yes webkit 1 Yes webkit 1 ? No No No ?
error Yes webkit 1 Yes webkit 1 ? No No No ?
Basic support Yes webkit 1 Yes webkit 1 ? No No No ?

1. You'll need to serve your code through a web server for recognition to work.

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

ドキュメントのタグと貢献者

このページの貢献者: lucian95, chrisdavidmills
最終更新者: lucian95,