aboutsummaryrefslogtreecommitdiff
path: root/app/converter/clients
diff options
context:
space:
mode:
authorhistoria <historiavg@proton.me>2026-09-10 00:16:00 -0400
committerhistoria <historiavg@proton.me>2026-09-10 00:16:00 -0400
commite2da233cd1baa859a5721542fc8b80d9f3f880e7 (patch)
tree4e86797cbd7dce0434feef65bc0ad2e97bfbe4c0 /app/converter/clients
parent31459b281b6a5368c692b3c42c91e522995ebd57 (diff)
downloadtts-audiobook-generator-e2da233cd1baa859a5721542fc8b80d9f3f880e7.tar.gz
fix: smart chunking, extraction, and process-safety issuesHEADmain
Diffstat (limited to 'app/converter/clients')
-rw-r--r--app/converter/clients/base.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/converter/clients/base.py b/app/converter/clients/base.py
index 9cf6979..7e9d919 100644
--- a/app/converter/clients/base.py
+++ b/app/converter/clients/base.py
@@ -133,6 +133,11 @@ class BaseTTSClient:
try:
result = self.generate_chunk(text, chunk_num)
if result and Path(result).exists():
+ # A cancel that arrived while this request was in
+ # flight must still stop the run: the generated audio
+ # is scratch (cleaned per book) and must not be
+ # returned for assembly.
+ self._check_cancelled()
return Path(result)
logger.warning("Chunk %d attempt %d failed", chunk_num, attempt + 1)
except ConversionCancelled: