From 26080046b5c454ffbb5f2e9193e978864a58daa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CNaeel=E2=80=9D?= Date: Fri, 22 May 2026 15:29:57 +0400 Subject: [PATCH] v40: remove debug logs, clean CORS (only Flask handles it) --- index.html | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index 4b56c5e..9fd746d 100644 --- a/index.html +++ b/index.html @@ -53,7 +53,7 @@ let mediaRecorder, audioChunks = [], userAudioBlob = null, ttsText = ''; let isRecording = false, isAnalyzing = false, micAnalyser = null, micAnimId = null; let recordStartTime = 0, recordDuration = 0; // ---------- Версия ---------- -const VERSION = 'v39'; +const VERSION = 'v40'; document.getElementById('ver').textContent = VERSION; // ---------- Перевод на русский (Groq) ---------- @@ -221,12 +221,11 @@ async function doCompare(blob, originalText, duration) { const elapsed = ((Date.now() - startTime) / 1000).toFixed(1); setStatus('Анализ... ' + elapsed + 'с'); }, 150); - const t0 = performance.now(); let whisperResult, phon; try { [whisperResult, phon] = await Promise.all([ - transcribe(blob).then(r => { console.log('[TIMING] transcribe:', ((performance.now()-t0)/1000).toFixed(2)+'s'); return r; }), - phoneticAnalysis(blob).then(r => { console.log('[TIMING] phonetic:', ((performance.now()-t0)/1000).toFixed(2)+'s'); return r; }) + transcribe(blob), + phoneticAnalysis(blob) ]); } catch(e) { clearInterval(timerId); @@ -611,7 +610,6 @@ document.getElementById('btnPlayUser').onclick = async () => { async function transcribe(blob) { if (!GROQ_API_KEY) return { text: '', error: 'no_key' }; - console.log('[BLOB] size:', blob.size, 'bytes, type:', blob.type); const formData = new FormData(); formData.append('file', new File([blob], 'audio.webm', { type: 'audio/webm' })); formData.append('model', 'whisper-large-v3');