aboutsummaryrefslogtreecommitdiff
path: root/app/converter
diff options
context:
space:
mode:
authorhistoria <historiavg@proton.me>2026-09-02 18:20:14 -0400
committerhistoria <historiavg@proton.me>2026-09-02 18:20:14 -0400
commitf14b80f6b42a0d0891718eb6284336b1694795cf (patch)
tree124e470824aecef8033a2ca9b39c87b0b2b345ee /app/converter
parent717a3dc112519ae7cf39a212a4e3ec9e1ba17f28 (diff)
downloadtts-audiobook-generator-f14b80f6b42a0d0891718eb6284336b1694795cf.tar.gz
fix: ZONOS2 only generating 1024 tokens max
Diffstat (limited to 'app/converter')
-rw-r--r--app/converter/clients/sglomni.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/converter/clients/sglomni.py b/app/converter/clients/sglomni.py
index 8484aba..d4b756f 100644
--- a/app/converter/clients/sglomni.py
+++ b/app/converter/clients/sglomni.py
@@ -274,6 +274,12 @@ class SgOmniTTSClient(BaseTTSClient):
}
if self._seed is not None:
payload["seed"] = self._seed
+ if entry.max_new_tokens is not None:
+ # Models whose engine caps a request below what a full
+ # sub-chunk can narrate (Zonos2's 1024-frame default is ~12 s):
+ # raise the ceiling per request. Generation still stops at
+ # natural EOS, so an unused margin costs nothing.
+ payload["max_new_tokens"] = entry.max_new_tokens
if entry.capability == "design":
payload["task_type"] = "VoiceDesign"
payload["instructions"] = self.instructions