SpeechRecognitionError
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental: これは実験的な機能です。
本番で使用する前にブラウザー互換性一覧表をチェックしてください。
Web Speech API の SpeechRecognitionError
インターフェイスは、認識サービスからのエラーメッセージを表します。
プロパティ
SpeechRecognitionError
は、親インターフェイスである Event
からのプロパティも継承します。
SpeechRecognitionError.error
読取専用-
起こったエラーの種類を返します。
SpeechRecognitionError.message
読取専用-
エラーの内容が詳しく書かれたメッセージを返します。
例
js
var recognition = new SpeechRecognition();
recognition.onerror = function (event) {
console.log("Speech recognition error detected: " + event.error);
console.log("Additional information: " + event.message);
};
仕様書
Specification |
---|
Web Speech API # speechrecognitionerrorevent |
ブラウザーの実装状況
Report problems with this compatibility data on GitHubLegend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- Experimental. Expect behavior to change in the future.
- Uses a non-standard name.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Firefox OS の許可設定
アプリ内で音声認識を使用するには、以下の許可設定を manifest で指定する必要があります:
json
"permissions": {
"audio-capture" : {
"description" : "Audio capture"
},
"speech-recognition" : {
"description" : "Speech recognition"
}
}
特権アプリも必要なため、以下も同様に含める必要があります:
json
"type": "privileged"