commcoach: SpeechRecognition Neustart nach botSpeaking/interrupted Wechsel

Made-with: Cursor
This commit is contained in:
ValueOn AG 2026-03-06 22:17:47 +01:00
parent bc94e52904
commit 93016a7e4c

View file

@ -171,8 +171,14 @@ export const CommcoachDossierView: React.FC = () => {
if (!SpeechRecognitionApi) return;
if (speechRecognitionRef.current) {
try { speechRecognitionRef.current.start(); } catch { /* already running */ }
return;
try {
speechRecognitionRef.current.start();
_dlog('REC-RESTART', 'reused existing');
} catch {
_dlog('REC-RESTART', 'existing failed, recreating');
speechRecognitionRef.current = null;
}
if (speechRecognitionRef.current) return;
}
let cancelled = false;