Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. SpeechRecognition
  4. soundstart

SpeechRecognition: soundstart event

Limited availability

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

Thesoundstart event of theWeb Speech API is fired when any sound — recognizable speech or not — has been detected.

Syntax

Use the event name in methods likeaddEventListener(), or set an event handler property.

js
addEventListener("soundstart", (event) => { })onsoundstart = (event) => { }

Event type

A genericEvent with no added properties.

Examples

You can use thesoundstart event in anaddEventListener method:

js
const recognition = new (SpeechRecognition || webkitSpeechRecognition)();recognition.addEventListener("soundstart", () => {  console.log("Some sound is being received");});

Or use theonsoundstart event handler property:

js
recognition.onsoundstart = () => {  console.log("Some sound is being received");};

Specifications

Specification
Web Speech API
# eventdef-speechrecognition-soundstart
Web Speech API
# dom-speechrecognition-onsoundstart

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp