anchor.diff:                  if (in_dialog && !window.tts.playing) {
                       startListening();
                   }
  +            };
  +            
  +            window.recognition.onaudiostart = function() {
  +            	speech_start_timestamp = new Date().getTime();
  +            	
  +            };
  +            
  +            window.recognition.onaudioend = function() {
  +            	window.dialog.trigger("error", "sound ended");
  +            	speech_start_timestamp = new Date().getTime();
               };
   
               window.recognition.onresult = function (event) {
  
positive.code:         var got_error = false;
          var in_dialog = false;
          var utterance_key = 0;
  
          $(document).ready(function () {
              // check browser
  
negative.code:                             window.recognition.stop();
                          },
                          error: function (response) {
  //                             window.dialog.trigger("error", "Unable to send speech to server.");
                          }
                      });
                 // }
  