# Sawt Najd TTS



Overview [#overview]

**Sawt Najd** (صوت نجد) is a state-of-the-art neural Text-to-Speech (TTS) model designed specifically for Arabic speech synthesis. It converts Arabic text into clear, expressive, and natural-sounding audio in WAV format.

Sawt Najd is ideal for:

* **Conversational AI & Voice Agents** — Power interactive voice response (IVR) and AI assistants with natural Arabic voices.
* **Content & Article Narration** — Automatically generate spoken audio from articles, books, and Islamic educational materials.
* **Accessibility** — Provide read-aloud functionality for visually impaired users.
* **E-Learning & Pronunciation** — Generate accurate Arabic speech for language learning and educational platforms.

***

Endpoint [#endpoint]

```
POST /v1/tts
```

Synthesizes speech from the provided Arabic text prompt and returns a binary WAV audio stream (`audio/wav`).

Requires an [API Key](/docs/api-keys) passed via the `x-api-key` header or `Authorization: Bearer <YOUR_API_KEY>`.

Request Body [#request-body]

| Field    | Type     | Required | Description                                                         |
| -------- | -------- | -------- | ------------------------------------------------------------------- |
| `model`  | `string` | Yes      | The TTS model to use. See [Models](/docs/models/tts#models).        |
| `prompt` | `string` | Yes      | The Arabic text content to convert into speech.                     |
| `voice`  | `string` | Yes      | The voice identifier to use. See [Voices](/docs/models/tts#voices). |

Example Request [#example-request]

```bash
curl -X POST http://api.kawn.ai/v1/tts \
  -H "x-api-key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "sawt-najd/voxcpm2",
    "prompt": "مرحباً بكم في منصة كَون، بوابتكم لنماذج الذكاء الاصطناعي للغة العربية والمحتوى الإسلامي.",
    "voice": "rashid"
  }' \
  --output speech.wav
```

***

Models [#models]

| Model ID            | Provider  | Description                                                                                     |
| ------------------- | --------- | ----------------------------------------------------------------------------------------------- |
| `sawt-najd/voxcpm2` | Sawt Najd | High-fidelity Arabic speech synthesis model with natural intonation and accurate pronunciation. |

***

Voices [#voices]

| Voice ID  | Gender | Description                                                                              |
| --------- | ------ | ---------------------------------------------------------------------------------------- |
| `rashid`  | Male   | Warm and natural male voice, well suited for formal narration and conversational agents. |
| `fatimah` | Female | Clear and expressive female voice, ideal for assistant and narration use.                |
| `default` | —      | Standard default voice profile.                                                          |

***

Response [#response]

The endpoint streams raw binary audio data with the following header:

```
Content-Type: audio/wav
```

You can stream the response directly to an audio player or save it to a `.wav` file.

***

Code Examples [#code-examples]

<Tabs items="['cURL', 'Node.js', 'Python']">
  <Tab value="cURL">
    ```bash
    curl -X POST http://api.kawn.ai/v1/tts \
      -H "x-api-key: <YOUR_API_KEY>" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "sawt-najd/voxcpm2",
        "prompt": "السلام عليكم ورحمة الله وبركاته",
        "voice": "fatimah"
      }' \
      --output output.wav
    ```
  </Tab>

  <Tab value="Node.js">
    ```javascript
    import fs from 'node:fs';

    const response = await fetch('http://api.kawn.ai/v1/tts', {
      method: 'POST',
      headers: {
        'x-api-key': process.env.KAWN_API_KEY,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        model: 'sawt-najd/voxcpm2',
        prompt: 'السلام عليكم ورحمة الله وبركاته',
        voice: 'fatimah',
      }),
    });

    if (!response.ok) {
      throw new Error(`HTTP error! status: ${response.status}`);
    }

    const arrayBuffer = await response.arrayBuffer();
    fs.writeFileSync('output.wav', Buffer.from(arrayBuffer));
    console.log('Audio saved to output.wav');

    ```
  </Tab>

  <Tab value="Python">
    ```python
    import os
    import requests

    url = "http://api.kawn.ai/v1/tts"
    headers = {
        "x-api-key": os.environ.get("KAWN_API_KEY"),
        "Content-Type": "application/json",
    }
    payload = {
        "model": "sawt-najd/voxcpm2",
        "prompt": "السلام عليكم ورحمة الله وبركاته",
        "voice": "fatimah",
    }

    response = requests.post(url, json=payload, headers=headers)
    response.raise_for_status()

    with open("output.wav", "wb") as f:
        f.write(response.content)

    print("Audio saved to output.wav")
    ```
  </Tab>
</Tabs>
