- Fixed timeout errors - Increased default timeout from 30s to 60s
- Better error handling - Now shows clear messages when retrying
- Improved reliability - Individual subtitle processing instead of batching
-
Automatic Retry with Exponential Backoff
- Retries failed requests up to 3 times (configurable)
- Waits progressively longer between retries (1s, 2s, 4s)
- Shows retry progress in terminal
-
Configurable Timeout
- New
--timeoutflag (default: 60 seconds) - Can increase to 120+ seconds for slow connections
- Example:
--timeout 120
- New
-
Request Delay
- New
--delayflag (default: 1.0 seconds) - Prevents rate limiting by spacing requests
- Example:
--delay 2.0
- New
-
Max Retries
- New
--max-retriesflag (default: 3) - Control how many times to retry failed requests
- Example:
--max-retries 5
- New
-
Better Progress Indicators
- Shows "✅ Translated X/Y subtitles..." every 10 subtitles
- Shows "⏱️ Timeout, retrying..." when needed
- Shows "❌ Failed" if all retries exhausted
- Removed batching - Processes one subtitle at a time for better reliability
- Added delays - 1 second between requests (prevents timeouts)
- Longer timeout - 60 seconds per request (was 30s)
--timeout SECONDS # Request timeout (default: 60)
--max-retries NUM # Maximum retries (default: 3)
--delay SECONDS # Delay between requests (default: 1.0)For reliability (recommended):
python translate_srt.py input.srt -t es --timeout 90 --delay 2.0For speed (may have more failures):
python translate_srt.py input.srt -t es --delay 0.5Maximum reliability:
python translate_srt.py input.srt -t es --timeout 120 --delay 3.0 --max-retries 5- Batch processing - Removed
--batch-sizeflag- Batching was causing timeouts and translation errors
- Individual processing is more reliable
- TROUBLESHOOTING.md - Comprehensive troubleshooting guide
- QUICK_START.md - Fast reference for common commands
- Updated README.md - Added timeout handling section
For 2,245 subtitles:
- Old version: 15-30 minutes (but frequent failures)
- New version (default): 40-60 minutes (reliable)
- New version (fast): 20-30 minutes with
--delay 0.5 - New version (safe): 75-90 minutes with
--delay 2.0
- Fixed timeout errors by increasing default timeout
- Fixed batch translation splitting issues
- Fixed JSON response parsing for different API formats
- Added missing import for
timemodule
No new dependencies! Still just:
requests>= 2.31.0
- Basic SRT parsing and translation
- Pollinations AI integration
- Batch processing
- Multi-language support