SpeechRecognition: end イベント

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

endウェブ音声 APISpeechRecognition オブジェクトのイベントで、音声認識サービスが切断された時に発生します。

構文

このイベント名を addEventListener() などのメソッドで使用するか、イベントハンドラープロパティを設定するかしてください。

js
addEventListener("end", (event) => {});

onend = (event) => {};

イベント型

一般的な Event であり、追加のプロパティはありません。

end イベントは、 addEventListener メソッドで使用することができます。

js
const recognition = new webkitSpeechRecognition() || new SpeechRecognition();

recognition.addEventListener("end", () => {
  console.log("音声認識サービスを切断しました。");
});

または onend イベントハンドラープロパティを使用してください。

js
recognition.onend = () => {
  console.log("音声認識サービスを切断しました。");
};

仕様書

Specification
Web Speech API
# eventdef-speechrecognition-end
Web Speech API
# dom-speechrecognition-onend

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
end event

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support

関連情報