SpeechRecognition: SpeechRecognition() constructor

The SpeechRecognition() constructor creates a new SpeechRecognition object instance.

Syntax

js
new SpeechRecognition()

Parameters

None.

Examples

This code is excerpted from our Speech color changer example.

js
const recognition = new SpeechRecognition();
recognition.lang = "en-US";
recognition.interimResults = false;
recognition.maxAlternatives = 1;

// …

Specifications

See also