> ## Documentation Index
> Fetch the complete documentation index at: https://docs.slng.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Gradium TTS default

> Real-time multilingual text-to-speech with streaming WebSocket and one-shot HTTP synthesis



## AsyncAPI

````yaml api-reference/asyncapi/tts-gradium.asyncapi.yaml /v1/tts/gradium/tts:default
id: /v1/tts/gradium/tts:default
title: Gradium TTS default
description: >-
  Real-time multilingual text-to-speech with streaming WebSocket and one-shot
  HTTP synthesis
servers:
  - id: production
    protocol: wss
    host: api.slng.ai
    bindings: []
    variables: []
  - id: staging
    protocol: wss
    host: stageapi.slng.ai
    bindings: []
    variables: []
address: /v1/tts/gradium/tts:default
parameters: []
bindings:
  - protocol: ws
    version: latest
    value:
      method: GET
      headers:
        type: object
        properties:
          X-World-Part-Override:
            type: string
            description: Override target world part. Auto-selected if not provided.
            x-parser-schema-id: <anonymous-schema-27>
        x-parser-schema-id: WebsocketHeadersGradium
    schemaProperties:
      - name: method
        type: string
        description: GET
        required: false
      - name: headers
        type: object
        required: false
        properties:
          - name: X-World-Part-Override
            type: string
            description: Override target world part. Auto-selected if not provided.
            required: false
operations:
  - &ref_1
    id: ttsGradiumTtsDefaultReceiveSetup
    title: Tts gradium tts default receive setup
    description: Send Setup on Gradium Gradium TTS default
    type: receive
    messages:
      - &ref_7
        id: GradiumTtsDefaultSetup
        contentType: application/json
        payload:
          - name: Setup
            description: Initialize the synthesis stream. Must be the first message.
            type: object
            properties:
              - name: const
                type: string
                description: setup
                required: false
              - name: voice_id
                type: string
                required: true
              - name: model_name
                type: string
                required: false
              - name: output_format
                type: string
                enumValues:
                  - wav
                  - pcm
                  - pcm_8000
                  - pcm_16000
                  - pcm_24000
                  - opus
                  - ulaw_8000
                  - alaw_8000
                required: false
              - name: json_config
                type: object
                required: false
                properties:
                  - name: language
                    type: string
                    required: false
                  - name: temperature
                    type: number
                    required: false
              - name: close_ws_on_eos
                type: boolean
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          description: Initialize the synthesis stream. Must be the first message.
          required:
            - type
            - voice_id
          properties:
            type:
              const: setup
              x-parser-schema-id: <anonymous-schema-2>
            voice_id:
              type: string
              x-parser-schema-id: <anonymous-schema-3>
            model_name:
              type: string
              default: default
              x-parser-schema-id: <anonymous-schema-4>
            output_format:
              type: string
              enum:
                - wav
                - pcm
                - pcm_8000
                - pcm_16000
                - pcm_24000
                - opus
                - ulaw_8000
                - alaw_8000
              x-parser-schema-id: <anonymous-schema-5>
            json_config:
              type: object
              properties:
                language:
                  type: string
                  x-parser-schema-id: <anonymous-schema-7>
                temperature:
                  type: number
                  x-parser-schema-id: <anonymous-schema-8>
              x-parser-schema-id: <anonymous-schema-6>
            close_ws_on_eos:
              type: boolean
              x-parser-schema-id: <anonymous-schema-9>
          x-parser-schema-id: <anonymous-schema-1>
        title: Setup
        description: Initialize the synthesis stream. Must be the first message.
        example: |-
          {
            "type": "setup",
            "voice_id": "<voice_id>"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: GradiumTtsDefaultSetup
    bindings: []
    extensions: &ref_0
      - id: x-parser-unique-object-id
        value: /v1/tts/gradium/tts:default
  - &ref_2
    id: ttsGradiumTtsDefaultReceiveText
    title: Tts gradium tts default receive text
    description: Send Text on Gradium Gradium TTS default
    type: receive
    messages:
      - &ref_8
        id: GradiumTtsDefaultText
        contentType: application/json
        payload:
          - name: Text
            description: A chunk of text to synthesize.
            type: object
            properties:
              - name: const
                type: string
                description: text
                required: false
              - name: text
                type: string
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          description: A chunk of text to synthesize.
          required:
            - type
            - text
          properties:
            type:
              const: text
              x-parser-schema-id: <anonymous-schema-11>
            text:
              type: string
              x-parser-schema-id: <anonymous-schema-12>
          x-parser-schema-id: <anonymous-schema-10>
        title: Text
        description: A chunk of text to synthesize.
        example: |-
          {
            "type": "text",
            "text": "Hello world."
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: GradiumTtsDefaultText
    bindings: []
    extensions: *ref_0
  - &ref_3
    id: ttsGradiumTtsDefaultReceiveEndOfStream
    title: Tts gradium tts default receive end of stream
    description: Send EndOfStream on Gradium Gradium TTS default
    type: receive
    messages:
      - &ref_9
        id: GradiumTtsDefaultEndOfStreamRequest
        contentType: application/json
        payload:
          - name: EndOfStream
            description: Signal that no more text will be sent.
            type: object
            properties:
              - name: const
                type: string
                description: end_of_stream
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          description: Signal that no more text will be sent.
          required:
            - type
          properties:
            type:
              const: end_of_stream
              x-parser-schema-id: <anonymous-schema-14>
          x-parser-schema-id: <anonymous-schema-13>
        title: EndOfStream
        description: Signal that no more text will be sent.
        example: |-
          {
            "type": "end_of_stream"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: GradiumTtsDefaultEndOfStreamRequest
    bindings: []
    extensions: *ref_0
  - &ref_4
    id: ttsGradiumTtsDefaultSendAudio
    title: Tts gradium tts default send audio
    description: Receive Audio on Gradium Gradium TTS default
    type: send
    messages:
      - &ref_10
        id: GradiumTtsDefaultAudio
        contentType: application/json
        payload:
          - name: Audio
            description: A chunk of base64-encoded synthesized audio.
            type: object
            properties:
              - name: const
                type: string
                description: audio
                required: false
              - name: audio
                type: string
                required: true
              - name: start_s
                type: number
                required: false
              - name: stop_s
                type: number
                required: false
              - name: stream_id
                type: integer
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          description: A chunk of base64-encoded synthesized audio.
          required:
            - type
            - audio
          properties:
            type:
              const: audio
              x-parser-schema-id: <anonymous-schema-16>
            audio:
              type: string
              format: base64
              x-parser-schema-id: <anonymous-schema-17>
            start_s:
              type: number
              x-parser-schema-id: <anonymous-schema-18>
            stop_s:
              type: number
              x-parser-schema-id: <anonymous-schema-19>
            stream_id:
              type: integer
              x-parser-schema-id: <anonymous-schema-20>
          x-parser-schema-id: <anonymous-schema-15>
        title: Audio
        description: A chunk of base64-encoded synthesized audio.
        example: |-
          {
            "type": "audio",
            "audio": "<audio>"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: GradiumTtsDefaultAudio
    bindings: []
    extensions: *ref_0
  - &ref_5
    id: ttsGradiumTtsDefaultSendEndOfStream
    title: Tts gradium tts default send end of stream
    description: Receive EndOfStream on Gradium Gradium TTS default
    type: send
    messages:
      - &ref_11
        id: GradiumTtsDefaultEndOfStreamComplete
        contentType: application/json
        payload:
          - name: EndOfStream
            description: Synthesis for the request is complete.
            type: object
            properties:
              - name: const
                type: string
                description: end_of_stream
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          description: Synthesis for the request is complete.
          required:
            - type
          properties:
            type:
              const: end_of_stream
              x-parser-schema-id: <anonymous-schema-22>
          x-parser-schema-id: <anonymous-schema-21>
        title: EndOfStream
        description: Synthesis for the request is complete.
        example: |-
          {
            "type": "end_of_stream"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: GradiumTtsDefaultEndOfStreamComplete
    bindings: []
    extensions: *ref_0
  - &ref_6
    id: ttsGradiumTtsDefaultSendError
    title: Tts gradium tts default send error
    description: Receive Error on Gradium Gradium TTS default
    type: send
    messages:
      - &ref_12
        id: GradiumTtsDefaultError
        contentType: application/json
        payload:
          - name: Error
            description: Terminal error.
            type: object
            properties:
              - name: const
                type: string
                description: error
                required: false
              - name: message
                type: string
                required: false
              - name: code
                type: integer
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          description: Terminal error.
          required:
            - type
          properties:
            type:
              const: error
              x-parser-schema-id: <anonymous-schema-24>
            message:
              type: string
              x-parser-schema-id: <anonymous-schema-25>
            code:
              type: integer
              x-parser-schema-id: <anonymous-schema-26>
          x-parser-schema-id: <anonymous-schema-23>
        title: Error
        description: Terminal error.
        example: |-
          {
            "type": "error"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: GradiumTtsDefaultError
    bindings: []
    extensions: *ref_0
sendOperations:
  - *ref_1
  - *ref_2
  - *ref_3
receiveOperations:
  - *ref_4
  - *ref_5
  - *ref_6
sendMessages:
  - *ref_7
  - *ref_8
  - *ref_9
receiveMessages:
  - *ref_10
  - *ref_11
  - *ref_12
extensions:
  - id: x-parser-unique-object-id
    value: /v1/tts/gradium/tts:default
securitySchemes:
  - id: bearer
    name: bearer
    type: http
    scheme: bearer
    extensions: []

````