Solution
/* JS comes here */
function SpeechRecog() {
var output = document.getElementById("output");
var action = document.getElementById("action");
var SpeechRecognition = SpeechRecognition || webkitSpeechRecognition;
var recognition = new SpeechRecognition();
// This runs when the speech recognition service starts
recognition.onstart = function() {
action.innerHTML = "listening, please speak...";
};
recognition.onspeechend = function() {
action.innerHTML = "stopped listening, hope you are done...";
recognition.stop();
}
// This runs when the speech recognition service returns result
recognition.onresult = function(event) {
var transcript = event.results[0][0].transcript;
var confidence = event.results[0][0].confidence;
output.value=transcript;
};
// start recognition
recognition.start();
}
button{
color:white;
background:blue;
border:none;
padding:10px;margin:5px;
border-radius:1em;
}
input{
padding:.5em;margin:.5em;
}
I'm Aakash1282,
Are you lazy, here is voice writer for your