This is cool.

This is cool. At first it looks like it didn’t work because the console just returns “undefined” but then notice (at least in Chrome…) that the camera icon appears in the url bar and when you speak, it very quickly responds with text in the console.

Originally shared by Paul Irish

Your very own speech recognition demo, courtesy of Ilmari Heikkinen. Drop this into your devtools console.

r = new webkitSpeechRecognition;

r.continuous = true; 

r.interimResults = true;

r.onresult = function(ev) {

    console.log(ev.results[ev.results.length-1][0].transcript);

};

r.start()

2 replies on “This is cool.”

  1. I tried running a TED video in the background while the speech recognition was running. The results were amusingly bad… But it’s pretty good at recognizing my voice when I speak slowly.

Comments are closed.