title: webkitSpeechRecognition is "lagging" behind when gathering results
body: <p>Had an itch to try out the <a href="http://updates.html5rocks.com/2013/01/Voice-Driven-Web-Apps-Introduction-to-the-Web-Speech-API" rel="noreferrer" title="Web Speech API">Web Speech API</a>.
  I copied the code exactly from the article, and I'm having an issue where you speak, but nothing happens until you speak AGAIN.</p>
  
  <p>[Fiddle: <a href="http://jsfiddle.net/w75v2tm5/" rel="noreferrer">http://jsfiddle.net/w75v2tm5/</a>]</p>
  
  <p>JS:</p>
  
  <pre><code>if (!('webkitSpeechRecognition' in window)) {
      //handle error stuff here...
  } else {
      var recognition = new webkitSpeechRecognition();
      recognition.continuous = true;
      recognition.interimResults = false;
  
      recognition.start();
  
      var final_transcript = '';
  
      recognition.onresult = function (event) {
          var interim_transcript = '';
          if (typeof (event.results) == 'undefined') {
              recognition.onend = null;
              recognition.stop();
              upgrade();
              return;
          }
          for (var i = event.resultIndex; i &lt; event.results.length; ++i) {
              if (event.results[i].isFinal) {
                  final_transcript += event.results[i][0].transcript;
              } else {
                  interim_transcript += event.results[i][0].transcript;
              }
          }
          document.getElementsByTagName('div')[0].innerText = final_transcript;
      };
  
  }
  </code></pre>
  
  <p>For example, if I were to say "Hello world", the &lt;div&gt; I have set up to display the results would not display "Hello world" until I said something else, or made a sound. But if I said something else, THAT would not be displayed until I said something else AGAIN.</p>
  
  <p>The variable "final_transcript" is holding the PREVIOUS result, and not what I just said. It's off by just 1.</p>
  
  <p>To give you a better idea...</p>
  
  <p>Me: "Hello world"</p>
  
  <p>final_transcript = '';</p>
  
  <p>[Wait...]</p>
  
  <p>Me: "Test"</p>
  
  <p>final_transcript = 'Hello world'</p>
  
  <p>And this just continues. The code is failing to transcribe what I am saying AS I am saying it. Very weird.</p>
  
  <p>Any thoughts as to why this could be?</p>