myt AI Cloud

By Mauritius Telecom

Beta
⌘K
API reference

Audio speech

POST /v1/audio/speech — text-to-speech synthesis.

POST

/v1/audio/speech

Synthesises speech from input text. Returns binary audio.

Request (JSON)

FieldTypeNotes
modelstringA TTS model id from your catalog, e.g. myt TTS.
inputstringText to synthesise.
voicestringA voice id supported by the model (model-specific — see the model detail page).
response_formatstringOptional, model-dependent: mp3, opus, aac, flac, wav, pcm.
speednumberOptional, where supported.

Response

Raw audio bytes with Content-Type matching the requested format.

Errors

400 for validation issues; 401 unauthorised; 429 rate limited.

Example

curl -sS --request "POST" \
  --url "$MYT_BASE_URL/audio/speech" \
  --header "Authorization: Bearer $MYT_API_KEY" \
  --header "Content-Type: application/json" \
  --output "speech.mp3" \
  --data '{"model":"myt TTS","input":"Hello from myt AI Cloud.","voice":"<voice-id>"}'

Try it

On this page