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 |
||
|---|---|---|
| .. | ||
| audio.ts | ||
| epub.ts | ||
| indexedDB.ts | ||
| nlp.ts | ||
| pdf.ts | ||
| voice.ts | ||