REVERIE · TTS

Speaker registry

Register and manage speakers from reference audio. A new or restored speaker is loaded automatically and can be used by inference and streaming without a separate load request.

WARNING
Every /v1/tts/speakers endpoint requires a Dev API key in the x-api-key header. Customer-tier keys are rejected.

Speaker object

FieldTypeDefaultDescription
namestring-Unique speaker identifier
referencestring-Storage key of the reference audio
transcriptstring-Transcript of the reference audio
genderstring-Speaker gender
created_atstring-ISO creation timestamp
updated_atstring-ISO update timestamp
clientstring-API key client name that created the speaker
versioninteger-Revision counter; increments on update
deletedboolean-Whether the speaker is soft-deleted

List and get speakers

GEThttps://api.lucidweights.ai/v1/tts/speakers
GEThttps://api.lucidweights.ai/v1/tts/speakers/{name}

The list returns {"speakers": [...]}. Both endpoints exclude soft-deleted speakers by default; pass include_deleted=true to include or fetch them. The single-speaker endpoint returns 404 when the name is not found.

Example
curl "https://api.lucidweights.ai/v1/tts/speakers?include_deleted=false" \
  -H "x-api-key: YOUR_DEV_API_KEY"

Create a speaker

POSThttps://api.lucidweights.ai/v1/tts/speakers

Send multipart/form-data, not JSON. A successful request returns the new speaker object with HTTP 201. An invalid name, unsupported language, or invalid audio returns 400; a duplicate name returns 409.

FieldTypeDefaultDescription
namestringrequiredUnique identifier: lowercase letters, digits, and hyphens only
transcriptstringrequiredExact transcript of the reference audio, 1–500 characters
audiofilerequiredWAV, MP3, or FLAC reference clip, at most 5 MB
language_codestringrequiredSupported language spoken in the reference clip
genderstringrequiredSpeaker gender
NOTE
WAV duration must be 3–30 seconds. The API checks file size, but does not enforce duration for MP3 or FLAC; keep those clips within 3–30 seconds too.
Example
curl -X POST "https://api.lucidweights.ai/v1/tts/speakers" \
  -H "x-api-key: YOUR_DEV_API_KEY" \
  -F "name=alice" \
  -F "transcript=Hello, my name is Alice." \
  -F "audio=@/path/to/alice_reference.wav" \
  -F "language_code=en" \
  -F "gender=female"

Update a speaker

PUThttps://api.lucidweights.ai/v1/tts/speakers/{name}

Send multipart form data with transcript, audio, or both. At least one is required. The same transcript and audio limits apply. The engine cache is invalidated and the speaker reloads automatically. Returns the updated speaker object, or 404 if missing.

Example
curl -X PUT "https://api.lucidweights.ai/v1/tts/speakers/alice" \
  -H "x-api-key: YOUR_DEV_API_KEY" \
  -F "audio=@/path/to/alice_new_reference.wav"

Delete and restore

DELETEhttps://api.lucidweights.ai/v1/tts/speakers/{name}
POSThttps://api.lucidweights.ai/v1/tts/speakers/{name}/restore

Delete is soft: it sets deleted: true and removes the speaker from the active engine cache. Restore sets it back to false and reloads the speaker. Both return the speaker object, or 404 if not found.

Preview a speaker

GEThttps://api.lucidweights.ai/v1/tts/speakers/{name}/preview

Generate a short sample outside the main inference queue. This GET request takes query parameters and returns raw audio/wav bytes.

FieldTypeDefaultDescription
textstringrequiredText to synthesize
api_keystringrequiredDev API key in the query string
languagestringenISO 639-1 language code
custom_pronunciationsstring-JSON-encoded pronunciation overrides
WARNING
The preview key is part of the URL. Do not share, bookmark, or log preview URLs. Missing or invalid keys return 401; a valid non-Dev key returns 403. Invalid pronunciation JSON returns 400.
Example
curl -G "https://api.lucidweights.ai/v1/tts/speakers/alice/preview" \
  --data-urlencode "text=This is a preview" \
  --data-urlencode "language=en" \
  --data-urlencode "api_key=YOUR_DEV_API_KEY" \
  --output preview.wav