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 + 'с'); // Показываем распознанный текст + кнопку подтверждения