Fix: extend clip if ends mid-vocal (no chorus cut-off), DejaVu Sans font (supports SLO/HR/BS chars), auto-upgrade to medium Whisper model for Slavic languages
This commit is contained in:
+36
-7
@@ -233,9 +233,9 @@
|
||||
<select id="model">
|
||||
<option value="tiny">tiny (najhitrejši)</option>
|
||||
<option value="base">base</option>
|
||||
<option value="small" selected>small (priporočeno)</option>
|
||||
<option value="medium">medium (zelo dobro)</option>
|
||||
<option value="large-v3">large-v3 (najboljše)</option>
|
||||
<option value="small" selected>small (DE/EN, hitro)</option>
|
||||
<option value="medium">medium (priporočeno za SLO/HR/BS)</option>
|
||||
<option value="large-v3">large-v3 (najboljše, počasno)</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -245,9 +245,16 @@
|
||||
Pametna izbira odseka (Whisper + energy → najde refren)
|
||||
</label>
|
||||
<div style="font-size: 12px; color: var(--text-dim); margin-top: 4px; margin-left: 26px;">
|
||||
Sistem analizira celoten video, najde refren ter pre-chorus build-up.
|
||||
Lahko traja malo dlje (do 1.5×) če to bolje prikazuje pesem.
|
||||
Audio fade in/out je avtomatsko dodan.
|
||||
Sistem naredi <b>celoten transkript</b> in <b>energy profile</b>, najde refren in ga izreže.
|
||||
Audio fade in/out je avtomatsko dodan na meje vokala.
|
||||
</div>
|
||||
|
||||
<label class="toggle" style="margin-top: 12px; margin-left: 26px;">
|
||||
<input type="checkbox" id="include-prebuild">
|
||||
Vključi pre-chorus (build-up pred refrenom)
|
||||
</label>
|
||||
<div style="font-size: 12px; color: var(--text-dim); margin-top: 2px; margin-left: 52px;">
|
||||
Privzeto izklopljeno: dobiš čist refren brez kitice.
|
||||
</div>
|
||||
|
||||
<div id="manual-times" class="row hidden">
|
||||
@@ -300,6 +307,14 @@
|
||||
<div class="progress-bar" id="live-bar" style="width: 0%;"></div>
|
||||
</div>
|
||||
<div style="font-size: 12px; color: var(--muted);" id="live-detail">Pripravljam...</div>
|
||||
<!-- Analysis summary z izbranim odsekom in transkriptom -->
|
||||
<div id="live-analysis" class="hidden" style="margin-top: 12px; padding: 10px; background: var(--panel); border-radius: 6px; font-size: 12px;">
|
||||
<div id="live-analysis-summary" style="margin-bottom: 8px; color: var(--text-dim);"></div>
|
||||
<details style="margin-top: 6px;">
|
||||
<summary style="cursor: pointer; color: var(--accent); font-weight: 600;">Pokaži celoten transkript</summary>
|
||||
<div id="live-transcript" style="margin-top: 8px; max-height: 240px; overflow-y: auto; font-family: monospace; font-size: 11px; line-height: 1.6;"></div>
|
||||
</details>
|
||||
</div>
|
||||
<div id="live-result" class="hidden" style="margin-top: 12px; display: flex; gap: 8px;">
|
||||
<button class="small" id="live-download" style="display: none;">⬇ Download</button>
|
||||
<button class="small ghost" id="live-preview" style="display: none;">▶ Preview</button>
|
||||
@@ -337,6 +352,15 @@
|
||||
$("#manual-times").classList.toggle("hidden", e.target.checked);
|
||||
});
|
||||
|
||||
// ─── Auto-upgrade Whisper model za slovanske jezike ──
|
||||
$("#lang").addEventListener("change", e => {
|
||||
const slavicLangs = ["sl", "hr", "bs", "sr"];
|
||||
const currentModel = $("#model").value;
|
||||
if (slavicLangs.includes(e.target.value) && (currentModel === "tiny" || currentModel === "base" || currentModel === "small")) {
|
||||
$("#model").value = "medium";
|
||||
}
|
||||
});
|
||||
|
||||
// ─── Drag & drop ────────────────────────────────
|
||||
const dz = $("#dropzone");
|
||||
const fileInput = $("#file-input");
|
||||
@@ -369,9 +393,9 @@
|
||||
lang: $("#lang").value || null,
|
||||
whisper_model: $("#model").value,
|
||||
auto_chorus: auto,
|
||||
include_prebuild: $("#include-prebuild").checked,
|
||||
start: !auto && $("#start").value ? parseTimestamp($("#start").value) : null,
|
||||
duration: duration,
|
||||
// Smart selection: max do 1.5x ciljno trajanje, min 0.7x
|
||||
max_duration: auto ? Math.round(duration * 1.5) : duration,
|
||||
min_duration: auto ? Math.round(duration * 0.7) : duration,
|
||||
subtitle_style: $("#subtitle-style").value,
|
||||
@@ -569,6 +593,11 @@
|
||||
const job = JSON.parse(e.data);
|
||||
updateJobInList(job);
|
||||
|
||||
// Pokaži analysis summary in transkript če je na voljo
|
||||
if (job.analysis_summary || job.full_transcript) {
|
||||
updateAnalysisDisplay(job);
|
||||
}
|
||||
|
||||
// Update live panel
|
||||
const step = job.current_step || "";
|
||||
const info = STAGE_INFO[step] || { pct: null, friendly: step };
|
||||
|
||||
Reference in New Issue
Block a user