Skip to content

Instantly share code, notes, and snippets.

View speech.js
/*
https://rawgit.com/chrisritter/25faedd4c8fa569fc2f8/raw/speech.js
*/
//listen (callback)
window.listen = function(callback) {
if(window.webkitSpeechRecognition) {
var recognition = new webkitSpeechRecognition();
recognition.onresult = function(e) {
callback(e.results[0][0].transcript,