SpeechRecognition: SpeechRecognition() コンストラクター
利用可能性は限定的
この機能はベースラインではありません。最も広く使用されているブラウザーの一部で動作しません。
Want more support for this feature? Tell us why.
SpeechRecognition() コンストラクターは、 SpeechRecognition のオブジェクトインスタンスを作成します。
構文
js
new SpeechRecognition()
引数
なし。
例
このコードは、 Speech color changer から引用しています。
js
const recognition = new SpeechRecognition();
recognition.lang = "en-US";
recognition.interimResults = false;
recognition.maxAlternatives = 1;
// …
仕様書
| 仕様書 |
|---|
| Web Speech API> # dom-speechrecognition-speechrecognition> |