Skip to content

Commit

Permalink
Update ESP32_SpeechRecognition.html
Browse files Browse the repository at this point in the history
  • Loading branch information
fustyles authored Aug 4, 2019
1 parent 4d89bd9 commit 43f7946
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ESP32_SpeechRecognition.html
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,12 @@
var interim_transcript = '';
var final_transcript = '';
var Recognition_interim = '';
var Recognition_final = '';
var Recognition_final = '';
if (typeof(event.results) == 'undefined') {
recognition.onend = null;
recognition.stop();
return;
}
for (var i = event.resultIndex; i < event.results.length; ++i) {
if (event.results[i].isFinal) {
final_transcript = event.results[i][0].transcript;
Expand Down

0 comments on commit 43f7946

Please sign in to comment.