diff --git a/js/audio.js b/js/audio.js index 508e00f..8e2fe89 100644 --- a/js/audio.js +++ b/js/audio.js @@ -105,8 +105,6 @@ async function playRec(id) { audio.onerror = () => { URL.revokeObjectURL(url); reject(); }; audio.play(); }); - const tr = await doCompare(rec.blob, rec.word, rec.duration); - if (tr) saveTranscription(id, tr); } } catch(e) { /* тихо */ } } diff --git a/js/main.js b/js/main.js index 1e9a140..2b88e21 100644 --- a/js/main.js +++ b/js/main.js @@ -1,6 +1,6 @@ // ---------- Глобальные переменные и инициализация ---------- const GROQ_API_KEY = ''; -const VERSION = 'v74'; +const VERSION = 'v75'; let mediaRecorder, audioChunks = [], userAudioBlob = null, ttsText = ''; let isRecording = false, isAnalyzing = false, micAnalyser = null, micAnimId = null; @@ -55,10 +55,6 @@ document.getElementById('btnPlayUser').onclick = async () => { setStatus('Ошибка воспроизведения — нажмите ещё раз.'); return; } - const original = document.getElementById('inputText').value.trim(); - if (original && userAudioBlob) { - await doCompare(userAudioBlob, original, recordDuration); - } }; // ---------- Кнопки ---------- @@ -83,10 +79,6 @@ document.getElementById('btnStereo').onclick = async () => { if (!text) return setStatus('Введите текст для эталона!'); if (!userAudioBlob) return setStatus('Нет записи! Нажмите 🎙 Записать.'); await playStereo(text, userAudioBlob); - const original = document.getElementById('inputText').value.trim(); - if (original && userAudioBlob) { - await doCompare(userAudioBlob, original, recordDuration); - } }; // ---------- История: compareRec / stereoRec ---------- @@ -113,8 +105,6 @@ async function stereoRec(id) { if (rec?.blob) { document.getElementById('inputText').value = rec.word; await playStereo(rec.word, rec.blob); - const tr = await doCompare(rec.blob, rec.word, rec.duration); - if (tr) saveTranscription(id, tr); } } catch(e) { setStatus('Ошибка загрузки записи.'); } }