Guard watchdog recovery from duplicate voice-mode resume
This commit is contained in:
1 parent
4ba4f77343
commit
a8137ff21c
2 files changed
+2
-1
No files matched your search
+1
-1
@@ -1101,7 +1101,7 @@ window._micPendingSend=window._micPendingSend||false;
|
||||
_browserTtsSuppressNextErrorRearm=false;
|
||||
_clearBrowserTtsRecovery();
|
||||
// After speaking, go back to listening
|
||||
if(_voiceModeActive) setTimeout(()=>_startListening(),500);
|
||||
if(_voiceModeActive&&_voiceModeState==='speaking') setTimeout(()=>_startListening(),500);
|
||||
};
|
||||
utter.onerror=()=>{
|
||||
_clearBrowserTtsRecovery();
|
||||
|
||||
@@ -40,6 +40,7 @@ def test_browser_tts_callbacks_and_deactivate_clear_recovery_handles():
|
||||
"Both browser TTS completion callbacks must clear watchdog/keep-alive handles."
|
||||
)
|
||||
assert "_browserTtsSuppressNextErrorRearm=false;" in speak_body
|
||||
assert "_voiceModeActive&&_voiceModeState==='speaking'" in speak_body
|
||||
assert "if(_browserTtsSuppressNextErrorRearm){" in speak_body
|
||||
assert "_armBrowserTtsRecovery(clean, utter.rate);" in speak_body
|
||||
|
||||
|
||||
Reference in new issue
Block a user