Skip to main content

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.

Hamsa STT supports two language codes:
CodeLanguageNotes
arArabicAll dialects — auto-detected
enEnglish

Arabic dialect detection

When you set language to ar, the model automatically detects the specific Arabic dialect being spoken. You do not need to specify the dialect. Supported dialects include Egyptian, Gulf, Levantine, Iraqi, and others.

Code-switching

The models handle speech that naturally switches between Arabic and English, which is common in many Arabic-speaking regions.

Setting the language

Batch API

Set the language field in your request body. Defaults to ar if omitted.
{
  "mediaUrl": "https://your-storage.com/audio.mp3",
  "model": "Hamsa-General-V2.0",
  "language": "ar"
}

Realtime API

Set the language field in your request body. Defaults to ar if omitted.
{
  "audioBase64": "<base64-encoded-audio>",
  "language": "en"
}

WebSocket

Set the language field in the STT payload. Defaults to ar if omitted.
{
  "type": "stt",
  "payload": {
    "audioBase64": "<base64-encoded-audio>",
    "language": "ar"
  }
}