recording cutoff bug in admin fixed
All checks were successful
Deploy FluentGerman.ai / deploy (push) Successful in 49s

This commit is contained in:
2026-02-18 13:18:49 +01:00
parent e6bf7c3d9c
commit e9f12bc2ba

View File

@@ -113,13 +113,14 @@ class VoiceManager {
await this._transcribeAPI(blob); await this._transcribeAPI(blob);
}; };
// Wait for recorder to actually start before updating UI // Only update UI once recording has truly started
this.mediaRecorder.start(); this.mediaRecorder.onstart = () => {
// Now we are truly recording
this.isRecording = true; this.isRecording = true;
this.lastInputWasVoice = true; this.lastInputWasVoice = true;
if (this.onStateChange) this.onStateChange(true); if (this.onStateChange) this.onStateChange(true);
};
this.mediaRecorder.start();
} catch (e) { } catch (e) {
console.error('[Voice] Mic access error:', e); console.error('[Voice] Mic access error:', e);