SpeechRecognition: audiostart イベント
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
audiostart
はウェブ音声 API のイベントで、ユーザーエージェントが音声認識のためのオーディオキャプチャを開始したときに発生します。
構文
このイベント名を addEventListener()
などのメソッドで使用するか、イベントハンドラープロパティを設定するかしてください。
js
addEventListener("audiostart", (event) => {});
onaudiostart = (event) => {};
イベント型
一般的な Event
であり、追加のプロパティはありません。
例
audiostart
イベントは、 addEventListener
メソッドで使用することができます。
js
const recognition = new webkitSpeechRecognition() || new SpeechRecognition();
recognition.addEventListener("audiostart", () => {
console.log("音声キャプチャを開始しました。");
});
または onaudiostart
イベントハンドラープロパティを使用してください。
js
recognition.onaudiostart = () => {
console.log("音声キャプチャを開始しました。");
};
仕様書
Specification |
---|
Web Speech API # eventdef-speechrecognition-audiostart |
Web Speech API # dom-speechrecognition-onaudiostart |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
audiostart event |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
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.