Skip to main content

Text-to-Speech

Turn text into speech in a single call, and optionally save the clip to your memory.

Overview

Trix can synthesize speech from text. It's the inverse of audio transcription: give it text, get back audio — useful for reading a summary aloud, voice replies, or generating a spoken version of a memory.

Synthesize speech

POST /v1/ai/tts converts text to speech synchronously and returns the audio. The call blocks until the clip is ready, so it fits request/response flows without polling.

Terminal
curl -X POST https://api.trixdb.com/v1/ai/tts \
  -H "Authorization: Bearer $TRIX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "text": "Your weekly summary is ready." }'

Save the clip to your memory

Opt in to keep the synthesized clip as a memory in your Data with POST /v1/ai/tts/save. The response points at the stored speech memory:

{ "id": "mem_…", "modality": "speech", "result_url": "https://…" }

Saved clips are ordinary memories — searchable, linkable, and viewable in Browse like any other audio memory.