Ummah Voice

REST API

Base URL: https://tts.ummahitsolutions.com/api/v1

Authenticate every request with your API key (create one on the API keys page):

Authorization: Bearer YOUR_API_KEY

Generation is asynchronous: you submit text, then check the status until it is completed, then download the audio. The first request after a quiet period can take 1–3 minutes while the voice engine wakes up (status: "starting"). Each character costs 1 credit; failed generations are refunded automatically. Max 5,000 characters per request. Limit: 60 requests/minute.

1. List voices

curl https://tts.ummahitsolutions.com/api/v1/voices \
  -H "Authorization: Bearer YOUR_API_KEY"

Languages & dialects

curl https://tts.ummahitsolutions.com/api/v1/languages \
  -H "Authorization: Bearer YOUR_API_KEY"
CodeNameScriptVoices
enEnglish (English) Latin any voice
urUrdu (اردو) Urdu (Nastaliq), RTL any voice
arArabic (العربية) Arabic (Naskh), RTL any voice
dhanniDhanni (Chakwal) (ڈھنی) Shahmukhi (Nastaliq), RTL native voices only — pass a voice_id of this language, or omit it to use the default

2. Create speech

curl -X POST https://tts.ummahitsolutions.com/api/v1/tts \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"السلام علیکم! یہ ایک ٹیسٹ ہے۔","language":"ur","voice_id":"VOICE_ID","speed":1.0,"format":"mp3"}'
FieldRequiredDescription
textyesUp to 5,000 characters
voice_idnoFrom /voices. Omit to use the language's default voice (or an automatic voice).
languagenoA code from /languages: en, ur, ar, dhanni (omit = auto-detect)
speedno0.5 – 2.0 (default 1.0)
formatnomp3 (default) or wav

Response 202:

{"id":"9b2f…","status":"queued","characters":31,"credits":31,"audio_url":null, "engine":{"message":"Waiting in queue…","progress":0}, …}

3. Check status

curl https://tts.ummahitsolutions.com/api/v1/generations/ID \
  -H "Authorization: Bearer YOUR_API_KEY"

status is one of queued, starting, processing, completed, failed. Poll every 2–5 seconds.

4. Download audio

curl -L https://tts.ummahitsolutions.com/api/v1/generations/ID/audio \
  -H "Authorization: Bearer YOUR_API_KEY" -o speech.mp3

Account

curl https://tts.ummahitsolutions.com/api/v1/account -H "Authorization: Bearer YOUR_API_KEY"

Errors

CodeMeaning
401Missing or invalid API key
403Account suspended
422Validation error, e.g. not enough credits or text too long (errors explains)
429Too many requests

Python example

import time, requests
API = "https://tts.ummahitsolutions.com/api/v1"
H = {"Authorization": "Bearer YOUR_API_KEY"}
job = requests.post(f"{API}/tts", headers=H, json={"text": "Hello from Ummah Voice", "language": "en"}).json()
while job["status"] not in ("completed", "failed"):
    time.sleep(3)
    job = requests.get(f"{API}/generations/{job['id']}", headers=H).json()
if job["status"] == "completed":
    open("speech.mp3", "wb").write(requests.get(job["audio_url"], headers=H).content)
else:
    print("Failed:", job["error"])