handle dead CUDA contexts and empty ASR results

- detect unrecoverable CUDA errors before OOM retries and clear model caches\n- keep normal OOM retries to two attempts (configured batch, then 1)\n- do not create text.txt when ASR returns only whitespace\n- warn per file and report empty_result / lrc+empty in the summary\n- keep at least 12 log lines visible in the GUI
This commit is contained in:
jadssss
2026-10-28 23:53:27 +03:00
parent 60846e3c6c
commit 841fc8902d
4 changed files with 72 additions and 18 deletions

View File

@@ -146,6 +146,13 @@ def run_lrc_pipeline(
)
lrc_content = segments_to_lrc(segments)
if not lrc_content.strip():
log(f" ⚠ {f.name}: текст не извлечён (пустой результат ASR)")
results.append(FileResult(
f, None, None,
"EmptyResult: ASR returned no text", "lrc+empty",
))
continue
lrc_path.write_text(lrc_content, encoding="utf-8")
log(f" ✓ text.lrc ({len(segments)} строк, язык: {detected})")