GO-Ve01
ServicesDevelopersBooksDictionaryPapersWikidataEncyclopediaSearchBabelCareersDeck

SpeechRecognitionEvent: results property

Web Speech API

Web Speech API

The **`results`** read-only property of the
SpeechRecognitionEvent interface returns a
SpeechRecognitionResultList object representing all the speech
recognition 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 subsequent
result events are fired, interim results may be overwritten by a newer
interim result or by a final result — they may even be removed, if they are at the end
of the "results" array and the array length decreases. Final results on the other hand
will not be overwritten or removed.

## Value

A SpeechRecognitionResultList object.

## Examples

This code is excerpted from our
[Speech color changer](https://github.com/mdn/dom-examples/blob/main/web-speech-api/speech-color-changer/script.js) example.

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

## Specifications

## Browser compatibility

## See also

- [Web Speech API](/docs/Web/API/Web_Speech_API)

source: MDN Web Docs mirror · page

Cite this

"SpeechRecognitionEvent: results property". MDN Web Docs. CC BY-SA 2.5 (MDN). https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognitionEvent/results

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·