diff options
| author | historia <historiavg@proton.me> | 2026-09-01 03:17:01 -0400 |
|---|---|---|
| committer | historia <historiavg@proton.me> | 2026-09-01 03:17:01 -0400 |
| commit | 058b19e7a65b40b1024a4fdeb2233062ff273cfd (patch) | |
| tree | fe3643872cd6b317a88eec950ae6ecc4d81d843d /audiobook.py | |
| parent | 10e72d4960e865acf5346ab8cf518ed5844fe45c (diff) | |
| download | tts-audiobook-generator-058b19e7a65b40b1024a4fdeb2233062ff273cfd.tar.gz | |
fix: better errors for generate all models
Diffstat (limited to 'audiobook.py')
| -rwxr-xr-x | audiobook.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/audiobook.py b/audiobook.py index 031ae1b..183bdc2 100755 --- a/audiobook.py +++ b/audiobook.py @@ -99,9 +99,12 @@ def _all_models_emit(progress, model_id: str, book_offset: int, Book events are renumbered into the run's global book sequence (BOOK_OFFSET plus the model's own index, GRAND_TOTAL overall) and stamped with the generating model; book_done/book_failed carry the - model too. The per-model "done"/"cancelled" events are swallowed — - the loop emits one merged "done" when every model has run — and - book_done outcomes are counted into COUNTS for that merged event. + model too. Every other converter event (chapter, chunks, chunk_done, + chunk_failed) is stamped with the model as well, so the run view can + attribute e.g. a chunk failure to the model that produced it. The + per-model "done"/"cancelled" events are swallowed — the loop emits one + merged "done" when every model has run — and book_done outcomes are + counted into COUNTS for that merged event. """ def emit(event: dict) -> None: kind = event.get("kind") @@ -116,7 +119,7 @@ def _all_models_emit(progress, model_id: str, book_offset: int, elif kind in ("done", "cancelled"): return else: - progress(event) + progress({**event, "model": model_id}) return emit |
