From 902b341f3585b9c863e2b9c6ad8c2dadbb6a2066 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CNaeel=E2=80=9D?= Date: Tue, 2 Jun 2026 06:14:11 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20=D0=BF=D1=83=D1=81=D1=82=D0=B0=D1=8F=20?= =?UTF-8?q?=D1=82=D1=80=D0=B0=D0=BD=D1=81=D0=BA=D1=80=D0=B8=D0=B1=D0=B0?= =?UTF-8?q?=D1=86=D0=B8=D1=8F=20=E2=80=94=20=D0=B1=D0=B5=D0=B7=20=D0=BA?= =?UTF-8?q?=D0=BD=D0=BE=D0=BF=D0=BA=D0=B8=20=D0=BE=D1=82=D0=BF=D1=80=D0=B0?= =?UTF-8?q?=D0=B2=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/public/index.html b/public/index.html index 9643102..48ef261 100644 --- a/public/index.html +++ b/public/index.html @@ -219,8 +219,14 @@ async function transcribe() { const tRes = await fetch('/api/whisper', { method: 'POST', body: fd, signal: ac.signal }); clearInterval(tTimer); const tData = await tRes.json(); - const text = tData.text || '(не распознано)'; + const text = tData.text || ''; const tElapsed = ((Date.now() - tStart) / 1000).toFixed(1); + if (!text.trim()) { + setStatus('⛔ Транскрибация: ' + tElapsed + 'с — ничего не распознано'); + btnRecord.textContent = '🎙 Записать'; btnRecord.disabled = false; isRecording = false; + userBlob = null; btnPlay.disabled = true; + return; + } setStatus('✅ Транскрибация: ' + tElapsed + 'с'); // Показываем распознанный текст + кнопку подтверждения