title: Speech-to-text with javascript in Chrome doesn't recognize anything
body: <p>I am trying to write a code in JAVASCRIPT which takes an input using voice and converts it into text and puts this text into textarea(HTML). My code is as shown below. The button appears kinda strange(smaller than usual) and when you click it, it doesnt work as desired. Please help.</p>
  
  <p>My code is as follows:</p>
  
  <pre><code>&lt;textarea id="textarea" rows=10 cols=80&gt;&lt;/textarea&gt;
  &lt;button id="button" onclick="toggleStartStop()"&gt;&lt;/button&gt;
  
  &lt;script type="text/javascript"&gt;
  var recognizing;
  var recognition = new SpeechRecognition();
  recognition.continuous = true;
  reset();
  recognition.onend = reset();
  
  recognition.onresult = function (event) {
    for (var i = resultIndex; i &lt; event.results.length; ++i) {
      if (event.results.final) {
        textarea.value += event.results[i][0].transcript;
      }
    }
  }
  
  function reset() {
    recognizing = false;
    button.innerHTML = "Click to Speak";
  }
  
  function toggleStartStop() {
    if (recognizing) {
      recognition.stop();
      reset();
    } else {
      recognition.start();
      recognizing = true;
      button.innerHTML = "Click to Stop";
    }
  }
  </code></pre>
  
  <p></p>