STT routing: FOLX DE / ZWEI \u2192 Scribe default (4\u00d7 hitrej\u0161e + brez Mississippi/Mrs. Sadie halucinacij). SLO postaje ostanejo na Soniox. User lahko override v UI.
This commit is contained in:
parent
1f8565413a
commit
6270c92b44
19
app/main.py
19
app/main.py
@ -759,8 +759,23 @@ def process_job(job_id):
|
|||||||
fn_hint = Path(job["filename"]).stem
|
fn_hint = Path(job["filename"]).stem
|
||||||
cmd += ["--filename-hint", fn_hint]
|
cmd += ["--filename-hint", fn_hint]
|
||||||
# STT provider (elevenlabs = Scribe, local = faster-whisper, auto = preferiraj Scribe)
|
# STT provider (elevenlabs = Scribe, local = faster-whisper, auto = preferiraj Scribe)
|
||||||
if job.get("whisper_provider"):
|
# Per-station default routing:
|
||||||
cmd += ["--whisper-provider", job["whisper_provider"]]
|
# FOLX DE / ZWEI (nemške) → Scribe (boljši za nemščino, brez "Mrs. Sadie" halucinacij)
|
||||||
|
# FOLX SLO / ONE / ADRIA → Soniox primary (auto = soniox_chain)
|
||||||
|
# User lahko v UI override-a (whisper_provider polje).
|
||||||
|
station = (job.get("tv_station") or "").upper()
|
||||||
|
DE_STATIONS = ("FOLX DE", "ZWEI", "ZWEI MUSIC TV", "FOLX MUSIC TV")
|
||||||
|
user_provider = job.get("whisper_provider")
|
||||||
|
if user_provider and user_provider not in ("auto", ""):
|
||||||
|
# User explicitly chose a provider — respect it
|
||||||
|
cmd += ["--whisper-provider", user_provider]
|
||||||
|
elif any(s in station for s in DE_STATIONS):
|
||||||
|
# Auto-route DE → Scribe
|
||||||
|
cmd += ["--whisper-provider", "elevenlabs"]
|
||||||
|
print(f"🇩🇪 Auto-routing STT to Scribe za {job.get('tv_station')}", flush=True)
|
||||||
|
elif user_provider:
|
||||||
|
# auto → analyze.py si izbere (soniox_chain default)
|
||||||
|
cmd += ["--whisper-provider", user_provider]
|
||||||
# lang: če None ali 'auto', pusti analyze.py auto-detect
|
# lang: če None ali 'auto', pusti analyze.py auto-detect
|
||||||
if job.get("lang") and job["lang"] not in ("auto", ""):
|
if job.get("lang") and job["lang"] not in ("auto", ""):
|
||||||
cmd += ["--lang", job["lang"]]
|
cmd += ["--lang", job["lang"]]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user