Skip to content

Commit

Permalink
Update GoogleSpeechAPI_SPN2.js
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-annett authored Aug 19, 2024
1 parent 3fdf44b commit e7603bb
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions mcec/speech/GoogleSpeechAPI_SPN2.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,17 +117,15 @@ class GoogleSpeechAPI_SPN extends HTMLElement {
};

recognition.onaudioend = ()=> {
if ( this.reloadTimer) return;
this.reloadTimer = setTimeout(() =>{
location.reload();
},60*1000);
console.log('on audio end');
};

recognition.onerror = (event) => {
console.warn (event.error);
if (event.error === 'no-speech') {
showInfo('info_no_speech');
ignore_onend = true;

ignore_onend = false;
}
if (event.error === 'audio-capture') {
showInfo('info_no_microphone');
Expand Down

0 comments on commit e7603bb

Please sign in to comment.