aboutsummaryrefslogtreecommitdiff
path: root/converter/tts.py
diff options
context:
space:
mode:
Diffstat (limited to 'converter/tts.py')
-rw-r--r--converter/tts.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/converter/tts.py b/converter/tts.py
index cb09936..1f5606f 100644
--- a/converter/tts.py
+++ b/converter/tts.py
@@ -114,8 +114,8 @@ class _BaseTTSClient:
Returns the generated chunk file's path, or None when all attempts
failed.
"""
- # Small delay between chunks to avoid rate limiting (only if not first chunk)
- if chunk_num > 1:
+ # Optional pause between API calls (rate limiting on hosted demos)
+ if chunk_num > 1 and config.MIN_DELAY_BETWEEN_CHUNKS > 0:
time.sleep(config.MIN_DELAY_BETWEEN_CHUNKS)
for attempt in range(config.MAX_RETRIES):