Skip to content

Instantly share code, notes, and snippets.

@capfsb
Created June 6, 2018 15:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save capfsb/beffaad515ed518863a83bf125d5869d to your computer and use it in GitHub Desktop.
Save capfsb/beffaad515ed518863a83bf125d5869d 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