Skip to content

Instantly share code, notes, and snippets.

@anish2690
Forked from capfsb/js.js
Created November 8, 2019 18:30
Show Gist options
  • Save anish2690/8762991b40ad194f18da43dd99a97381 to your computer and use it in GitHub Desktop.
Save anish2690/8762991b40ad194f18da43dd99a97381 to your computer and use it in GitHub Desktop.
js.js
var recognition = new (window.SpeechRecognition || window.webkitSpeechRecognition || window.mozSpeechRecognition || window.msSpeechRecognition)();
recognition.lang = 'en-US';
recognition.interimResults = false;
recognition.maxAlternatives = 5;
recognition.start();
recognition.onresult = function(event) {
console.log('You said: ', event);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment