From 11384921323f7b08271be0607d8df774489a1f7d Mon Sep 17 00:00:00 2001 From: historia Date: Wed, 19 Aug 2026 02:10:13 -0400 Subject: fix: reduce chunk size to 40 --- converter/converter.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'converter/converter.py') diff --git a/converter/converter.py b/converter/converter.py index ec06bbb..3b2782f 100644 --- a/converter/converter.py +++ b/converter/converter.py @@ -340,7 +340,6 @@ class AudiobookConverter: avg_chunk_size = sum(chunk_sizes) / len(chunk_sizes) logger.info("Split into %d chunks (avg %.0f words per chunk)", total_chunks, avg_chunk_size) print(f"[INFO] Processing {total_chunks} chunks via Qwen API...") - print(f"[INFO] Estimated time: ~{total_chunks * 4} minutes (4 min per chunk)") results = self._synthesize_chunks(chunks) successful_chunks = sum(1 for path in results.values() if path) @@ -414,6 +413,7 @@ class AudiobookConverter: def run(self) -> bool: """Main conversion process. Returns True if all books converted.""" + run_start = time.time() self._print_banner() # Check for books @@ -493,4 +493,16 @@ class AudiobookConverter: if successful > 0: print(f"\n[INFO] Audiobooks saved to: {config.AUDIOBOOKS_FOLDER}/") + elapsed = int(time.time() - run_start) + hours, remainder = divmod(elapsed, 3600) + minutes, seconds = divmod(remainder, 60) + if hours: + duration = f"{hours}h {minutes}m {seconds}s" + elif minutes: + duration = f"{minutes}m {seconds}s" + else: + duration = f"{seconds}s" + print(f"\n[INFO] Generation completed in {duration}") + logger.info("Generation completed in %s", duration) + return total > 0 and successful == total -- cgit v1.2.3