window.SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition; var recognition = new SpeechRecognition(); recognition.lang = 'ja'; recognition.onresult = function(event){ var results = event.results; for (var i = event.resultIndex; i < results.length; i++) { var text = results[i][0].transcript; console.log("text:", text); } } recognition.start();