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:
+13
-1
@@ -166,6 +166,8 @@ def process_job(job_id):
|
||||
"--min-duration", str(job.get("min_duration", 20)),
|
||||
"--output", str(analysis_path),
|
||||
]
|
||||
if job.get("include_prebuild"):
|
||||
cmd += ["--include-prebuild"]
|
||||
# lang: če None ali 'auto', pusti analyze.py auto-detect
|
||||
if job.get("lang") and job["lang"] not in ("auto", ""):
|
||||
cmd += ["--lang", job["lang"]]
|
||||
@@ -188,7 +190,15 @@ def process_job(job_id):
|
||||
"fade": fade,
|
||||
"chorus_preview": analysis["chorus"]["best"]["text_preview"]
|
||||
if analysis.get("chorus") and analysis["chorus"].get("best") else None,
|
||||
"video_duration": analysis.get("video_duration"),
|
||||
"candidates": analysis["chorus"].get("all_candidates", [])[:5]
|
||||
if analysis.get("chorus") else [],
|
||||
},
|
||||
# Cel transkript shranimo za UI prikaz
|
||||
full_transcript=[
|
||||
{"start": s["start"], "end": s["end"], "text": s["text"]}
|
||||
for s in analysis.get("transcript", {}).get("segments", [])
|
||||
],
|
||||
start=cr["start"],
|
||||
duration=cr["duration"],
|
||||
fade_in=fade["fade_in"],
|
||||
@@ -299,9 +309,10 @@ class StartJobIn(BaseModel):
|
||||
mode: str = "track"
|
||||
lang: Optional[str] = None # None/auto = Whisper auto-detect
|
||||
auto_chorus: bool = True
|
||||
include_prebuild: bool = False # vključi pre-chorus build-up
|
||||
start: Optional[float] = None
|
||||
duration: Optional[float] = 30
|
||||
max_duration: Optional[float] = 45 # Smart selection lahko gre do 45s
|
||||
max_duration: Optional[float] = 45
|
||||
min_duration: Optional[float] = 20
|
||||
no_subs: bool = False
|
||||
subtitle_style: str = "reels"
|
||||
@@ -401,6 +412,7 @@ async def start_processing(
|
||||
mode=payload.mode,
|
||||
lang=payload.lang,
|
||||
auto_chorus=payload.auto_chorus,
|
||||
include_prebuild=payload.include_prebuild,
|
||||
start=payload.start,
|
||||
duration=payload.duration,
|
||||
max_duration=payload.max_duration,
|
||||
|
||||
Reference in New Issue
Block a user