v104: точная привязка слогов к аудио через word timestamps Whisper

This commit is contained in:
“Naeel”
2026-05-23 14:39:54 +04:00
parent 7302d6ef62
commit 6fe6f77c07
5 changed files with 236 additions and 18 deletions
+4
View File
@@ -89,6 +89,10 @@ async function doCompare(blob, originalText, duration) {
// Слоги — в отдельный div, не в diff (diff перезаписывается)
_currentBlob = blob;
_currentSylBuf = null;
_currentSylMap = whisperResult.words && whisperResult.words.length > 0
? mapSyllablesToTimestamps(originalText, whisperResult.words)
: null;
console.log('[SYL] map:', _currentSylMap);
const sylDiv = document.getElementById('syllables');
sylDiv.innerHTML = '';
const sy = syllabifyIT(originalText);