From 96f178b56ee4dc1ea010149f3bde540c6b23cb05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CNaeel=E2=80=9D?= Date: Fri, 22 May 2026 17:40:15 +0400 Subject: [PATCH] =?UTF-8?q?fix:=20phoneticAnalysis=20timeout=2015s=20?= =?UTF-8?q?=E2=80=94=20=D0=B7=D0=B0=D1=89=D0=B8=D1=82=D0=B0=20=D0=BE=D1=82?= =?UTF-8?q?=20=D0=B7=D0=B0=D0=B2=D0=B8=D1=81=D0=B0=D0=BD=D0=B8=D1=8F=20dec?= =?UTF-8?q?odeAudioData=20(Chrome=20bug,=20=D0=B4=D0=BB=D0=B8=D0=BD=D0=BD?= =?UTF-8?q?=D1=8B=D0=B5=20WebM)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 9126097..e2fe774 100644 --- a/index.html +++ b/index.html @@ -223,9 +223,12 @@ async function doCompare(blob, originalText, duration) { }, 150); let whisperResult, phon; try { + const phonTimeout = new Promise(resolve => + setTimeout(() => resolve({ pitchHz: 0, pitchStability: 0, voiceClarity: 0, phonScore: 0 }), 15000) + ); [whisperResult, phon] = await Promise.all([ transcribe(blob), - phoneticAnalysis(blob) + Promise.race([phoneticAnalysis(blob), phonTimeout]) ]); } catch(e) { clearInterval(timerId);