Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
HTML5 Speech to text example
var recognition = new webkitSpeechRecognition();
recognition.continuous = true;
//recognition.interimResults = true;
function start(){
recognition.onresult = function(event) {
var output = document.getElementById("output");
output.innerHTML = "";
for(var i=0; i<event.results.length; i++){
output.innerHTML = output.innerHTML + event.results[i][0].transcript;
<h1>Speach to text</h1>
<input id = "bStart" type = "button" value = "Start" onclick = "start();"></input>
<div id = "output"></div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment