The problem
Live TTS on every page load is expensive, slow, and creates unpredictable UX (latency spikes, rate limits, and inconsistent voices).
The pattern
- Generate audio once during content creation (or batch jobs)
- Store the MP3 under
site/public/audio/... - Reference it in frontmatter:
audioUrl: "/audio/..." - Serve it like any static asset
Why it works (enterprise reality)
- Cost control: predictable spend, no surprise bills
- Speed: instant playback, no synthesis wait
- Consistency: the narration is exactly what you reviewed
- Offline-ish: site remains useful even if API keys are revoked
Failure mode
The only downside is you need a small “audio build” pipeline — which we already have.