REVERIE · TTS

Prerecordings

Maintain the cached audio for frequently requested text. These endpoints alter the prerecorded cache; each request requires an API key in the x-api-key header.

Incremental refresh

POSThttps://api.lucidweights.ai/v1/tts/prerecordings/refresh

Rebuilds the cache for all active speakers using the top 100 texts from the latest two windows. Already cached texts are reused; only new texts are generated. The request returns after local files and the RAM cache are swapped. Versioned upload continues in the background. There is no request body.

NOTE
This can run for a while. Use a generous client timeout. The response contains a message status string.
Example
curl -X POST "https://api.lucidweights.ai/v1/tts/prerecordings/refresh" \
  -H "x-api-key: YOUR_API_KEY"

Full refresh

POSThttps://api.lucidweights.ai/v1/tts/prerecordings/refresh/manual

Regenerates every selected top text without reusing existing audio, so reference-audio updates are reflected in the cache. All body fields are optional. The response contains a message status string.

FieldTypeDefaultDescription
speakersstring[]all activeRestrict refresh to these speakers
top_ninteger100Number of top texts to regenerate
gen_concurrencyinteger2Parallel generation workers
Example
curl -X POST "https://api.lucidweights.ai/v1/tts/prerecordings/refresh/manual" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"speakers":["alice"],"top_n":50,"gen_concurrency":2}'

Sync replicas

POSThttps://api.lucidweights.ai/v1/tts/prerecordings/sync

Reconciles the in-memory cache with stored manual entries and the latest automatic refresh snapshot. The versioned entry wins when a speaker and text collide. Only new or changed audio is downloaded; removed entries are dropped. No TTS engine is needed on the current pod, but the endpoint returns 503 if the speaker service is unavailable on this host. There is no request body.

Example
curl -X POST "https://api.lucidweights.ai/v1/tts/prerecordings/sync" \
  -H "x-api-key: YOUR_API_KEY"