aboutsummaryrefslogtreecommitdiff
path: root/app/converter/clients/sglomni.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/converter/clients/sglomni.py')
-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