Finally got the memory thing under contril, I'm pretty sure.

This commit is contained in:
Storm Dragon
2025-11-13 00:44:58 -05:00
parent 8bcde8bf37
commit 671a290323
4 changed files with 106 additions and 13 deletions

View File

@@ -59,7 +59,8 @@ class TtsEngine:
# Safety: Limit text size to prevent excessive memory usage
# ~10,000 chars = ~10-15 minutes of audio at normal reading speed
MAX_TEXT_LENGTH = 10000
# Reduced to 5000 to lower memory usage per paragraph
MAX_TEXT_LENGTH = 5000
if len(text) > MAX_TEXT_LENGTH:
print(f"Warning: Paragraph too long ({len(text)} chars), truncating to {MAX_TEXT_LENGTH}")
text = text[:MAX_TEXT_LENGTH] + "..."