Skip to main content
POST
/
api
/
v2
/
AQL
/
TextToSpeech
curl --request POST \
  --url https://gateway.widebot.net/api/v2/AQL/TextToSpeech \
  --header 'Content-Type: application/json' \
  --header 'x-bot: <api-key>' \
  --header 'x-user-auth: <api-key>' \
  --data '
{
  "TextMessage": "مرحباً بكم في منصة وايد بوت للذكاء الاصطناعي",
  "LanguageCode": "ar-sa",
  "speaker": "Rawy",
  "temperature": 0.5,
  "output_sr": 24000,
  "session_id": "tts-session-001"
}
'
{
  "StatusCode": 200,
  "Response": {
    "status": "success",
    "audio_url": "https://cdn.widebot.net/tmp/tts/abc123xyz/output.mp3",
    "duration_ms": 1850,
    "characters": 18,
    "language": "ar-sa",
    "speaker": "Rawy",
    "output_sr": 24000,
    "session_id": "tts-session-001"
  },
  "Consumption": "18/15000"
}

Authorizations

x-user-auth
string
header
required

Your API key from account settings

x-bot
string
header
required

Your bot ID from account settings

Body

application/json
TextMessage
string
required

Text to convert to speech

Example:

"وش علومك اليوم؟"

LanguageCode
string
required

Language code for speech synthesis

Example:

"ar-sa"

speaker
string
required

Voice to use for speech generation

Example:

"Rawy"

temperature
number<float>

Controls variation in speech generation

Required range: 0 <= x <= 1
Example:

0.5

output_sr
integer

Output sample rate in Hz

Example:

24000

session_id
string

Optional session identifier

Example:

"example-session-001"

Response

200 - application/json

Text to speech conversion successful

StatusCode
integer
Example:

200

Response
object
Consumption
string

Character usage tracking

Example:

"18/15000"