Audio Generation
TF Design generates speech through text-to-speech. That is the only audio kind the backend implements.
music and sfx are declared in the registry so the type surface is honest about intent, but they have no backend endpoint. Advertising them previously meant a request for music produced a robotic reading of the prompt instead. Requests with audioKind: music or audioKind: sfx are now rejected up front.
GET /api/media/models returns audioKinds: ["speech"]. Gate on that list.
Model
| Id | Label | Character | Caps |
|---|---|---|---|
mystica_voice | Mystica Voice | Natural speech — default | tts |
The underlying TTS engine key is dispatcher-only and is stripped from the browser payload — the model route never ships it.
How it works
- You supply the text to be spoken as the prompt.
- The daemon submits a synthesis job to the backend.
- The audio file is written into the project folder.
- The FileViewer renders an audio player; the download chip saves it.
Speech duration follows the text, not a slider. The audioDurationsSec list in the models payload only applies to music/SFX, which are not enabled — it is kept for the future UI surface and is not a usable parameter today.
Parameters
| Parameter | Values | Notes |
|---|---|---|
prompt | text | This is the text to read, not a style description |
voice | provider voice id | Omit for the provider default |
language | language hint, e.g. en, it | |
audioKind | speech | Only accepted value |
output | filename | Auto-named when omitted |
--duration is rejected on speech: accepting it would imply control the endpoint does not have.
CLI
"$OD_NODE_BIN" "$OD_BIN" media generate \
--project "$OD_PROJECT_ID" \
--surface audio \
--model mystica_voice \
--audio-kind speech \
--voice <voice-id> \
--language en \
--prompt "Welcome to Insight, the analytics platform built for data teams."
MCP
{
"surface": "audio",
"model": "mystica_voice",
"audioKind": "speech",
"prompt": "The text to be spoken.",
"voice": "<voice-id>",
"language": "en"
}
Then drive the returned taskId with wait_media.
Use cases
| Use case | Notes |
|---|---|
| Deck narration | Render per-slide audio, then combine in your video editor |
| Video voiceover | Pair with a motion composition or a rendered clip |
| Explainer audio | Short, plain sentences read better than dense prose |
| Accessibility descriptions | Read a summary of the artifact |
Writing for TTS
- Spell out numbers and symbols when they matter (
£29 per month, not£29/mo). - Short sentences. TTS handles full stops and commas; it does not handle dense clauses gracefully.
- Avoid markdown in the prompt — asterisks and backticks get read or ignored inconsistently.
- Test the voice id once before generating a long script; a wrong voice on a 3-minute narration wastes a render.
Voice selection
voice is a provider voice id, not a gender or a style word. Passing "female" does not select a female voice — it either falls back to the default or fails upstream. Use the ids the provider exposes.
The default voice is used when voice is omitted.
Using audio in artifacts
<audio src="assets/narration.mp3" controls></audio>
Triggered on interaction:
const chime = new Audio('assets/narration.mp3');
button.addEventListener('click', () => chime.play());
Routes
| Endpoint | Method | Description |
|---|---|---|
/api/projects/:id/media/generate | POST | surface: "audio" with audioKind: "speech" |
/api/media/tasks/:id/wait | POST | Long-poll the synthesis task |
/api/media/models | GET | audioKinds tells you what is actually enabled |
See Motion for adding audio layers to a composition, and Video for combining narration with footage.