Hamsa Text to Speech (TTS) converts written text into natural-sounding audio with proper Arabic pronunciation, intonation, and support for multiple dialects. Whether you’re creating media content, building voice applications, or making content accessible, Hamsa TTS delivers high-quality Arabic speech synthesis.Documentation Index
Fetch the complete documentation index at: https://docs.tryhamsa.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
API Reference
Technical API documentation for developers
Quickstart
Get started with TTS in minutes
Key features
Arabic dialect support
Hamsa TTS supports a wide range of Arabic dialects:- Multiple dialects: Egyptian, Gulf, Levantine, Iraqi, and Modern Standard Arabic
- Natural pronunciation: Proper handling of Arabic phonetics and pronunciation rules
- Code-switching: Handling of mixed Arabic-English text
- Diacritical marks: Support for tashkeel and proper pronunciation
High-quality voices
- Pre-built Arabic voices optimized for different dialects
- Custom voice cloning for brand consistency
- Gender and age variety
Flexible integration
- REST API for programmatic access — both async jobs and realtime
- WebSocket for streaming TTS
- Media Platform web interface
API endpoints
Hamsa provides two TTS endpoints for different use cases:Jobs API
Async —
/v1/jobs/text-to-speechInitiates a TTS job and delivers the result via webhook. Best for batch processing and media content generation.Parameters: text, voiceId, webhookUrlRealtime API
Sync —
/v1/realtime/ttsReturns WAV audio directly in the response. Best for real-time voice agents and interactive applications.Parameters: text, speaker, dialect, mulawSupported dialects
| Code | Dialect | Example voices |
|---|---|---|
pls | Palestinian | Amjad, Layan |
egy | Egyptian | Mariam, Samir |
syr | Syrian | Dalal, Mais |
irq | Iraqi | Lyali, Fatma |
jor | Jordanian | Lana, Jasem |
leb | Lebanese | Carla, Majd |
ksa | Saudi | Hiba, Fahd |
uae | Emirati | Salma, Dima |
bah | Bahraini | Mazen, Ruba |
qat | Qatari | Deema, Faisal |
kuw | Kuwaiti | Mai, Hatem |
oma | Omani | Aisha, Jaber |
msa | Modern Standard Arabic | Salem, Tamim |
ar-sa | Arabic – Gulf | Khalid, Rahma |
en | English | Emma, James |
Getting started
Choose your integration
Use the Realtime API for direct audio, the Jobs API for async processing, or the Media Platform web interface.
Select a voice and dialect
Choose a voice and dialect that matches your target audience from the table above.
Generate audio
Call the API with your text and voice selection. See the Quickstart for examples.
Next steps
Quickstart Guide
Build your first TTS integration
Voice Options
Explore available voices
Voice Cloning
Learn about custom voice cloning
Media Platform
Use TTS via web interface
FAQ
What's the difference between the Jobs API and Realtime API?
What's the difference between the Jobs API and Realtime API?
The Jobs API (
/v1/jobs/text-to-speech) is async — it creates a job and delivers the audio via webhook. Use it for batch processing. The Realtime API (/v1/realtime/tts) returns WAV audio directly in the response — use it for real-time applications and voice agents.Can I mix Arabic and English in the same text?
Can I mix Arabic and English in the same text?
Yes, Hamsa TTS handles code-switching between Arabic and English.
How do I choose the right dialect?
How do I choose the right dialect?
Choose the dialect that matches your target audience. Egyptian Arabic has wide recognition across the Arab world. Gulf dialects are preferred in GCC countries. Levantine is common in the Levant region. For formal content, use Modern Standard Arabic (MSA).
Can I clone my own voice?
Can I clone my own voice?
Yes, Hamsa supports custom voice cloning. See the voice cloning guide for details.
What audio format does the API return?
What audio format does the API return?
The Realtime API returns WAV audio by default. You can enable μ-law encoding via the
mulaw parameter for telephony use cases.