v75: убран автоанализ при проигрывании — ▶ и 🎧 только играют

This commit is contained in:
“Naeel”
2026-05-22 21:33:32 +04:00
parent c0658f6c20
commit 66a3e32c03
3 changed files with 2 additions and 26 deletions
-2
View File
@@ -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) { /* тихо */ }
}
+1 -11
View File
@@ -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('Ошибка загрузки записи.'); }
}