Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. SpeechRecognitionEvent
  4. results

SpeechRecognitionEvent: results property

Limited availability

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

Theresults read-only property of theSpeechRecognitionEvent interface returns aSpeechRecognitionResultList object representing all the speechrecognition results for the current session.

Specifically this object will contain all final results that have been returned,followed by the current best hypothesis for all interim results. When subsequentresult events are fired, interim results may be overwritten by a newerinterim result or by a final result — they may even be removed, if they are at the endof the "results" array and the array length decreases. Final results on the other handwill not be overwritten or removed.

Value

ASpeechRecognitionResultList object.

Examples

This code is excerpted from ourSpeech color changer example.

js
recognition.onresult = (event) => {  const color = event.results[0][0].transcript;  diagnostic.textContent = `Result received: ${color}.`;  bg.style.backgroundColor = color;};

Specifications

Specification
Web Speech API
# dom-speechrecognitionevent-results

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp