diff --git a/claude-arabic-voice/offscreen.js b/claude-arabic-voice/offscreen.js index 6cf256a..8495179 100644 --- a/claude-arabic-voice/offscreen.js +++ b/claude-arabic-voice/offscreen.js @@ -40,6 +40,12 @@ function initRecognition(language) { recognition.onerror = (event) => { console.error('[Offscreen] Recognition error:', event.error); + + // Prevent infinite restart loop on fatal errors + if (event.error !== 'no-speech') { + isRecording = false; + } + chrome.runtime.sendMessage({ type: 'OFFSCREEN_RECORDING_ERROR', payload: { error: event.error }