diff options
| author | historia <historiavg@proton.me> | 2026-09-02 18:20:14 -0400 |
|---|---|---|
| committer | historia <historiavg@proton.me> | 2026-09-02 18:20:14 -0400 |
| commit | f14b80f6b42a0d0891718eb6284336b1694795cf (patch) | |
| tree | 124e470824aecef8033a2ca9b39c87b0b2b345ee /app/converter | |
| parent | 717a3dc112519ae7cf39a212a4e3ec9e1ba17f28 (diff) | |
| download | tts-audiobook-generator-f14b80f6b42a0d0891718eb6284336b1694795cf.tar.gz | |
fix: ZONOS2 only generating 1024 tokens max
Diffstat (limited to 'app/converter')
| -rw-r--r-- | app/converter/clients/sglomni.py | 6 |
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 |
