Skip to main content
POST
Stream speech with style

Authorizations

Authorization
string
header
required

Pass the API key in the Authorization header, You need to put Token keyword before the API key. e.g. 'Authorization: Token '

Body

application/json
text
string
required

Text to speak, 1 to 2,000 characters. May contain <pause_short> and <pause_long>; a line break counts as a short pause. Numbers, dates and units are read out in words.

Required string length: 1 - 2000
Example:

"أهلاً، كيف بقدر أساعدك اليوم؟"

speaker
string
required

The voice: a voice name, or the ID of one of your cloned voices (preload it first with the Preload Cloned Voice endpoint). An unknown voice, or a voice ID that isn't yours, gets 404.

Example:

"Amjad"

dialect
enum<string> | null

Overrides the voice's dialect. Leave it out (or send null) for the voice's own dialect. uae Emirati, ksa Saudi, kuw Kuwaiti, qat Qatari, bah Bahraini, oma Omani, egy Egyptian, jor Jordanian, pls Palestinian, leb Lebanese, syr Syrian, irq Iraqi, msa Modern Standard Arabic, eng English.

Available options:
uae,
ksa,
kuw,
qat,
bah,
oma,
egy,
jor,
pls,
leb,
syr,
irq,
msa,
eng
Example:

"pls"

languageId
enum<string>
default:ar

Language of the text: ar or en.

Available options:
ar,
en
mulaw
boolean
default:false

true: 8 kHz µ-law (phone audio). false: 16-bit PCM.

Example:

false

sampleRate
enum<string>
default:16k

PCM output rate: 8k or 16k. Not allowed with mulaw: true (mu-law is always 8 kHz).

Available options:
8k,
16k
Example:

"16k"

model
enum<string>
default:default

default, or hamsa-tts-en for the English model. Any other value uses default.

Available options:
default,
hamsa-tts-en
generationId
string | null

Send the same ID with every piece of one reply, so voice and tone stay continuous across them. Make a new one for each reply. 1 to 128 characters.

Required string length: 1 - 128
Example:

"reply-7f3a2c"

emotion
enum<string> | null

Speaking style for this request: neutral, happy, excited, calm, sympathetic, sad, frustrated, angry, surprised, hesitant, tired or whispering. Leave it out (or send null) for neutral.

Available options:
neutral,
happy,
excited,
calm,
sympathetic,
sad,
frustrated,
angry,
surprised,
hesitant,
tired,
whispering
Example:

"happy"

casual
boolean | null

Relaxed, spontaneous speech with natural hesitations. Leave it out (or send null) for false.

Example:

true

autoEmotion
boolean | null

Picks an emotion from the text (an apology sounds sympathetic, laughter happy) and turns casual off for that request. Set false so your emotion and casual are always used. Leave it out (or send null) for true.

Example:

false

mapFillers
boolean | null

Turns written fillers into real filler sounds (امم or "Hmm" is said as "umm"). Leave it out (or send null) for true.

Example:

true

useNativeEnglish
boolean | null

false: English words are said with the voice's Arabic accent. true: English parts get a native English pronunciation. Leave it out (or send null) for false.

Example:

false

Response

Audio stream (chunked).

The response is of type file.