openreader/src/utils
Richard Roberson 70723f4c1d perf(api): add LRU cache for TTS audio responses
Introduce an in-memory LRU cache for TTS audio with configurable
size and TTL via TTS_CACHE_MAX_SIZE_BYTES and TTS_CACHE_TTL_MS.
Return X-Cache headers (HIT/MISS) and set route runtime to nodejs.
Cache key includes provider, model, voice, speed, format, text,
and optional instructions.

Normalize non-Kokoro multi-voice input to the first token while
preserving full voice string in the cache key. Default Deepinfra
model to hexgrad/Kokoro-82M when none is provided.

Fix Deepinfra Kokoro behavior by enforcing single-voice selection:
- ui: only enable multi-select when provider supports >1 voices
- voice utils: Deepinfra max voices set to 1
- tests: gate provider selection and multi-voice tests by CI and
  increase timeout for stability
2025-11-12 23:28:05 -07:00
..
audio.ts feat(audiobook): add chapter-based export with UI and API 2025-11-11 13:32:30 -07:00
epub.ts Chapter by chapter auto-play 2025-02-09 02:55:49 -07:00
indexedDB.ts Saving and Loading Progress Bar 2025-07-19 20:22:50 -07:00
nlp.ts feat(tts,ui,api): add Kokoro multi-voice selection and SDK support 2025-11-12 20:46:45 -07:00
pdf.ts feat: Add issue triage and mapping documentation for OpenReader v1 2025-11-10 13:19:45 -07:00
voice.ts perf(api): add LRU cache for TTS audio responses 2025-11-12 23:28:05 -07:00