This commit restructures the audiobook generation and serving layer to rely exclusively on S3-compatible blob storage, removing the dependency on local filesystem paths. - Bundle `ffmpeg` and `ffprobe` binaries via npm to ensure portability across environments. - Update API routes to stream audio directly from blob storage instead of local disk. - Remove legacy migration endpoints and filesystem-based indexing logic. - Add startup scripts to facilitate the transition from local to remote storage. BREAKING CHANGE: Audiobook functionality is now strictly dependent on S3 configuration. The previous filesystem-based storage method has been removed.
1.5 KiB
1.5 KiB
| title |
|---|
| TTS Rate Limiting |
This page explains OpenReader's TTS character rate limiting controls.
Overview
- TTS rate limiting is disabled by default.
- To enable it, set
TTS_ENABLE_RATE_LIMIT=true. - Limits are enforced per day in UTC.
- Enforcement applies only when auth is enabled.
How enforcement works
When enabled, OpenReader enforces:
- Per-user daily character limits.
- IP backstop daily character limits.
- Anonymous device backstop tracking (cookie-based) to reduce limit resets.
If a request exceeds the active limit, the TTS API returns 429 with reset metadata for the next UTC day.
Required auth behavior
- Auth must be enabled (
BASE_URL+AUTH_SECRET) for TTS char limits to apply. - If auth is disabled, TTS character limits are effectively unlimited.
DISABLE_AUTH_RATE_LIMITonly affects Better Auth's own request throttling.DISABLE_AUTH_RATE_LIMITdoes not disable TTS character limits.
Environment variables
Enable/disable:
TTS_ENABLE_RATE_LIMIT(default:false)
Per-user daily limits:
TTS_DAILY_LIMIT_ANONYMOUS(default:50000)TTS_DAILY_LIMIT_AUTHENTICATED(default:500000)
IP backstop daily limits:
TTS_IP_DAILY_LIMIT_ANONYMOUS(default:100000)TTS_IP_DAILY_LIMIT_AUTHENTICATED(default:1000000)
Related docs
- Full variable list: Environment Variables
- Auth configuration: Auth
- Provider setup: TTS Providers