---
title: "BaseTTSRequest"
url: "https://dev.silma.ai/apis/silma-tts-api-2/versions/d7a27b7e-ba8b-495a-a2a3-3cdf9c2b4be3/schemas/BaseTTSRequest"
---

> Full API specification: https://dev.silma.ai/apis/silma-tts-api-2/versions/d7a27b7e-ba8b-495a-a2a3-3cdf9c2b4be3.md

# BaseTTSRequest

## OpenAPI definition

```yaml
openapi: 3.1.0
info:
  title: SILMA TTS v2 API
  version: 2.3.1
servers:
  - url: https://api.silma.ai/tts/v2
components:
  schemas:
    BaseTTSRequest:
      type: object
      required:
        - model_id
        - text
        - voice_id
      properties:
        model_id:
          type: string
          enum:
            - silma-tts-v2-english
            - silma-tts-v2-msa
            - silma-tts-v2-ksa
          description: The model id to use (English, Arabic MSA or Arabic KSA dialect).
        text:
          type: string
          description: >
            * The text to synthesize into speech.

            * To pronounce phone numbers correctly use
            `<STAG_PN>92005455</STAG_PN>`

            * To pronounce emails correctly use
            `<STAG_EMAIL>test@silma.ai</STAG_EMAIL>`

            * To pronounce links correctly use
            `<STAG_LINK>www.silma.ai</STAG_LINK>`

            * To insert a pause use the SSML break tag, e.g. `<break
            time="500ms"/>` or `<break time="1.5s"/>` (max 5s per pause; a bare
            `<break/>` pauses 0.5s). Only the "time" attribute is supported.

            * Break tags do not count toward the character limit or billed
            characters.
          example: أنا نموذج سِلْمَا الجديد لتحويل النص إلى كلام، أستطيع التحدث باللغة
            العربية مع أو بدون تشكيل.
        creativity:
          type: number
          format: float
          default: 0.2
          description: Variance in speech prosody.
        speed:
          type: number
          format: float
          default: 0.4
          deprecated: true
          description: |
            * Deprecated. Kept for backward compatibility and behaves as before.
            * Use "speech_rate" to control how fast the voice speaks.
        speech_rate:
          type: number
          format: float
          default: 1
          minimum: 0.7
          maximum: 1.4
          description: >
            * Speaking rate multiplier. 1.0 is the voice's natural pace, 1.2 is
            20% faster and 0.8 is 20% slower.

            * The voice and its pitch stay the same at every rate.
        voice_id:
          type: string
          enum:
            - james
            - emma
            - isabella
            - oliver
            - abdulaziz
            - fahd
            - layla
            - maryam
            - nouf
            - noura
            - omar
            - reema
            - yusuf
            - khalid
            - salwa
            - saja
            - sultan
            - salman
            - sulaiman
            - salim
          description: >
            * The ID of the pre-defined voice.

            * English voices: [james, emma, isabella, oliver]

            * Arabic voices: [abdulaziz, fahd, layla, maryam, nouf, noura, omar,
            reema, yusuf, khalid]

            * Legacy Arabic voices: [salwa, saja, sultan, salman, sulaiman,
            salim]
        user_id:
          type: string
          description: Optional user identifier, needed only for pronunciation overrides
            and loading custom voices. Find it here
            https://app.silma.ai/api-keys
        custom_audio_id:
          type: string
          description: >
            * The ID representing your uploaded custom voice to be cloned. 

            * This should be an ID for a voice (ex:voice_1769817467123) in the
            "Custom Voices" section in https://app.silma.ai/voices.

            * If you use this parameter then you should use the "user_id"
            parameter as well.
        enable_server_pronunciation_overrides:
          type: boolean
          description: This indicates that you have added custom pronunciation overrides
            to your account via https://app.silma.ai/control. Enabling this
            feature will automatically customize the model based on your
            overrides.
          default: false
        invalidate_user_cache:
          type: boolean
          description: >
            * Pronunciation overrides and cached audio (see "enable_cache") are
            cached on the server.

            * Set this to true on a single request to drop all of your cached
            overrides and cached audio. Overrides are then re-read from storage
            and the audio is generated again.

            * The UI sends this when you edit your pronunciation overrides.
            Otherwise, the server uses cached audio and overrides, which keeps
            the old pronunciation. You typically don’t need to use this unless
            you want to intentionally invalidate all cached audio and overrides
            for some reason.
          default: false
        enable_cache:
          type: boolean
          description: >
            * Cache the generated audio on the server and return it from the
            cache for identical requests, instead of generating it again.

            * Requests are identical when they call the same endpoint with the
            same "model_id", "voice_id", "text", "speed", "speech_rate",
            "creativity", "quality_to_inference_speed_ratio", "custom_audio_id"
            and "enable_server_pronunciation_overrides", from the same account.

            * Cached responses are billed half the characters (rounded up).

            * Cached audio is private to your account and kept for up to 30
            days. Use "invalidate_user_cache" to drop it.

            * The "X-Cache" response header is "HIT" when the response came from
            the cache, "MISS" when it was generated, and "BYPASS" when caching
            was not requested.
          default: false
```
