Arabic text to speech API
Generate Arabic speech with POST /v1/audio/speech. Choose a voice, stream PCM or WAV, and configure text normalization and pronunciation.
Send POST /v1/audio/speech with your API key to receive streamed audio. For voice-agent setup, see Arabic TTS integrations.
curl --fail --show-error https://api.sawtakarabi.ai/v1/audio/speech \
-H "Authorization: Bearer $SAWTAK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "arabic-tts-1",
"voice": "<VOICE_ID>",
"input": "مرحباً بك",
"response_format": "wav"
}' \
--dump-header speech.headers \
--output speech.partial.wavKeep the X-Request-Id from speech.headers. Before using the file, verify completion and finalize its WAV header.
Request fields
| Field | Required | Description |
|---|---|---|
model | No | Defaults to arabic-tts-1. |
input | Yes | Nonblank text, at most 10,000 characters and 400 characters per word. |
voice | Yes | A ready voice ID from the catalog. |
response_format | No | pcm (default) for raw audio, or wav for a WAV stream. Case-insensitive. |
sample_rate | No | Integer sample rate from 8,000 to 48,000 Hz; defaults to 24,000 Hz. Read X-Sample-Rate in the response. |
normalize_text | No | Boolean, default true. Converts numbers, dates, currencies, and units into spoken words. Set to false to disable this conversion. |
enhance_pronunciation | No | Boolean, default false. Adds Arabic diacritics (tashkeel) to guide pronunciation, using the selected voice’s dialect. Preserves existing diacritics. |
Text preparation
Text normalization is enabled by default. The service automatically chooses how to read numbers, dates, currencies, and units from the text and selected voice. You can separately enable enhance_pronunciation to add Arabic diacritics before speech generation.
Choose a voice with the dialect you want. Send plain text or Markdown; SSML is unsupported. Split text longer than 10,000 characters at sentence boundaries.
See Streaming audio for playback, saved WAV files, and partial-stream charges. Use Operations and retries for status, cancellation, and duplicate protection.
Adding pauses
Insert [short pause] for a brief pause or [pause] for a longer pause directly in your text. Use these lowercase tags between spoken words or sentences:
Hi, good morning! [short pause] This is Maria. [pause] How may I help you today?The voice model produces the silence, so the exact duration can vary. Place tags before more speech, rather than at the end of the text; trailing pause tags are removed. Newlines also add pauses when text normalization is enabled. Sentence-ending punctuation alone does not insert a pause tag.
Advanced options
Omit these unless you need to adjust synthesis:
| Field | Description |
|---|---|
cfg_value | Model guidance strength. Defaults to 2; numeric values are clamped to 0–10. |
temperature | Sampling randomness. Defaults to 1; numeric values are clamped to 0–2. |
Use a custom voice
Create a private voice through Voice cloning, then pass the returned ID as voice.
For response failures and retries, see Errors and Request limits.
Use text and voices you have the rights and permissions to use, and review the audio before publishing it. See the Terms of Service and Acceptable Use Policy.