> ## 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.

# Unified TTS

> Stream synthesized audio from any SLNG-supported TTS model over the unified WebSocket protocol with init, text, flush, and binary audio frames.



## AsyncAPI

````yaml api-reference/asyncapi/bridges-unmute.asyncapi.yaml /v1/bridges/unmute/tts/{model_variant}
id: /v1/bridges/unmute/tts/{model_variant}
title: Unmute TTS Bridge
description: >-
  Stream synthesized audio from any SLNG-supported TTS model over the unified
  WebSocket protocol with init, text, flush, and binary audio frames.
servers:
  - id: production
    protocol: wss
    host: api.slng.ai
    bindings: []
    variables: []
  - id: staging
    protocol: wss
    host: stageapi.slng.ai
    bindings: []
    variables: []
address: /v1/bridges/unmute/tts/{model_variant}
parameters: []
bindings:
  - protocol: ws
    version: latest
    value:
      method: GET
      headers:
        type: object
        properties:
          X-Region-Override:
            type: string
            description: Target region override. Auto-selected if not provided.
            x-parser-schema-id: <anonymous-schema-74>
          X-World-Part-Override:
            type: string
            description: Target world part override. Auto-selected if not provided.
            x-parser-schema-id: <anonymous-schema-75>
        x-parser-schema-id: WebsocketHeaders
      query:
        type: object
        properties:
          region:
            type: string
            description: >-
              Target region override as a query parameter. Auto-selected if not
              provided. Equivalent to the `X-Region-Override` header; the header
              takes precedence when both are set.
            enum:
              - ap-southeast-2
              - eu-north-1
              - us-east-1
            x-parser-schema-id: <anonymous-schema-76>
          world-part:
            type: string
            description: >-
              Target world part override as a query parameter. Auto-selected if
              not provided. Equivalent to the `X-World-Part-Override` header;
              the header takes precedence when both are set.
            enum:
              - ap
              - eu
              - na
            x-parser-schema-id: <anonymous-schema-77>
        x-parser-schema-id: WebsocketQueryParams
    schemaProperties:
      - name: method
        type: string
        description: GET
        required: false
      - name: headers
        type: object
        required: false
        properties:
          - name: X-Region-Override
            type: string
            description: Target region override. Auto-selected if not provided.
            required: false
          - name: X-World-Part-Override
            type: string
            description: Target world part override. Auto-selected if not provided.
            required: false
      - name: query
        type: object
        required: false
        properties:
          - name: region
            type: string
            description: >-
              Target region override as a query parameter. Auto-selected if not
              provided. Equivalent to the `X-Region-Override` header; the header
              takes precedence when both are set.
            enumValues:
              - ap-southeast-2
              - eu-north-1
              - us-east-1
            required: false
          - name: world-part
            type: string
            description: >-
              Target world part override as a query parameter. Auto-selected if
              not provided. Equivalent to the `X-World-Part-Override` header;
              the header takes precedence when both are set.
            enumValues:
              - ap
              - eu
              - na
            required: false
operations:
  - &ref_1
    id: unmuteTtsBridgeReceiveInit
    title: Unmute tts bridge receive init
    description: Initialize session on Unmute TTS Bridge
    type: receive
    messages:
      - &ref_11
        id: UnmuteTtsInitMessage
        contentType: application/json
        payload:
          - name: Init (Unmute TTS)
            description: Initialize Unmute TTS session with voice and configuration.
            type: object
            properties:
              - name: type
                type: string
                description: init
                required: true
              - name: voice
                type: string
                description: Voice identifier.
                required: false
              - name: config
                type: object
                description: Synthesis configuration.
                required: false
                properties:
                  - name: sample_rate
                    type: integer
                    description: Audio sample rate in Hz.
                    enumValues:
                      - 8000
                      - 16000
                      - 22050
                      - 24000
                      - 32000
                      - 44100
                      - 48000
                    required: false
                  - name: encoding
                    type: string
                    description: Output audio encoding format.
                    enumValues:
                      - linear16
                      - mp3
                      - opus
                      - mulaw
                      - alaw
                    required: false
                  - name: language
                    type: string
                    description: ISO-639-1 language code.
                    enumValues:
                      - en
                      - ja
                      - zh
                      - de
                      - hi
                      - fr
                      - ko
                      - pt
                      - it
                      - es
                      - id
                      - nl
                      - tr
                      - fil
                      - pl
                      - sv
                      - bg
                      - ro
                      - ar
                      - cs
                      - el
                      - fi
                      - hr
                      - ms
                      - sk
                      - da
                      - ta
                      - uk
                      - ru
                      - hu
                      - 'no'
                      - vi
                    required: false
                  - name: speed
                    type: number
                    description: Speech speed multiplier.
                    required: false
        headers: []
        jsonPayloadSchema:
          type: object
          description: Initialize TTS session with voice and configuration.
          required:
            - type
          properties:
            type:
              type: string
              const: init
              x-parser-schema-id: <anonymous-schema-41>
            voice:
              type: string
              description: Voice identifier.
              x-parser-schema-id: <anonymous-schema-42>
            config:
              type: object
              description: Synthesis configuration.
              properties:
                sample_rate:
                  type: integer
                  description: Audio sample rate in Hz.
                  enum:
                    - 8000
                    - 16000
                    - 22050
                    - 24000
                    - 32000
                    - 44100
                    - 48000
                  x-parser-schema-id: SampleRate
                encoding:
                  type: string
                  description: Output audio encoding format.
                  enum:
                    - linear16
                    - mp3
                    - opus
                    - mulaw
                    - alaw
                  x-parser-schema-id: <anonymous-schema-44>
                language:
                  type: string
                  description: ISO-639-1 language code.
                  enum:
                    - en
                    - ja
                    - zh
                    - de
                    - hi
                    - fr
                    - ko
                    - pt
                    - it
                    - es
                    - id
                    - nl
                    - tr
                    - fil
                    - pl
                    - sv
                    - bg
                    - ro
                    - ar
                    - cs
                    - el
                    - fi
                    - hr
                    - ms
                    - sk
                    - da
                    - ta
                    - uk
                    - ru
                    - hu
                    - 'no'
                    - vi
                  x-parser-schema-id: LanguageCode
                speed:
                  type: number
                  description: Speech speed multiplier.
                  x-parser-schema-id: <anonymous-schema-45>
              x-parser-schema-id: <anonymous-schema-43>
          x-parser-schema-id: <anonymous-schema-40>
        title: Init (Unmute TTS)
        description: Initialize Unmute TTS session with voice and configuration.
        example: |-
          {
            "type": "init",
            "voice": "aura-2-thalia-en",
            "config": {
              "sample_rate": 24000,
              "encoding": "linear16"
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: UnmuteTtsInitMessage
    bindings: []
    extensions: &ref_0
      - id: x-parser-unique-object-id
        value: /v1/bridges/unmute/tts/{model_variant}
  - &ref_2
    id: unmuteTtsBridgeReceiveText
    title: Unmute tts bridge receive text
    description: Send text to Unmute TTS Bridge
    type: receive
    messages:
      - &ref_12
        id: UnmuteTtsTextMessage
        contentType: application/json
        payload:
          - name: Text (Unmute TTS)
            description: Send text to synthesize.
            type: object
            properties:
              - name: type
                type: string
                description: text
                required: true
              - name: text
                type: string
                description: Text to synthesize.
                required: true
              - name: flush
                type: boolean
                description: Whether to flush immediately after this text.
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          description: Text to synthesize into audio.
          required:
            - type
            - text
          properties:
            type:
              type: string
              const: text
              x-parser-schema-id: <anonymous-schema-47>
            text:
              type: string
              description: Text to synthesize.
              x-parser-schema-id: <anonymous-schema-48>
            flush:
              type: boolean
              description: Whether to flush immediately after this text.
              x-parser-schema-id: <anonymous-schema-49>
          x-parser-schema-id: <anonymous-schema-46>
        title: Text (Unmute TTS)
        description: Send text to synthesize.
        example: |-
          {
            "type": "text",
            "text": "Hello, how can I help you?"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: UnmuteTtsTextMessage
    bindings: []
    extensions: *ref_0
  - &ref_3
    id: unmuteTtsBridgeReceiveFlush
    title: Unmute tts bridge receive flush
    description: Flush buffered output on Unmute TTS Bridge
    type: receive
    messages:
      - &ref_13
        id: UnmuteTtsFlushMessage
        contentType: application/json
        payload:
          - name: Flush (Unmute TTS)
            description: Flush buffered audio.
            type: object
            properties:
              - name: type
                type: string
                description: flush
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          description: Flush any buffered audio to the client.
          required:
            - type
          properties:
            type:
              type: string
              const: flush
              x-parser-schema-id: <anonymous-schema-51>
          x-parser-schema-id: <anonymous-schema-50>
        title: Flush (Unmute TTS)
        description: Flush buffered audio.
        example: |-
          {
            "type": "flush"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: UnmuteTtsFlushMessage
    bindings: []
    extensions: *ref_0
  - &ref_4
    id: unmuteTtsBridgeReceiveClose
    title: Unmute tts bridge receive close
    description: Close session on Unmute TTS Bridge
    type: receive
    messages:
      - &ref_14
        id: UnmuteTtsCloseMessage
        contentType: application/json
        payload:
          - name: Close (Unmute TTS)
            description: Close TTS session.
            type: object
            properties:
              - name: type
                type: string
                description: close
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          description: Close the current synthesis session and stop any further audio.
          required:
            - type
          properties:
            type:
              type: string
              const: close
              x-parser-schema-id: <anonymous-schema-53>
          x-parser-schema-id: <anonymous-schema-52>
        title: Close (Unmute TTS)
        description: Close TTS session.
        example: |-
          {
            "type": "close"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: UnmuteTtsCloseMessage
    bindings: []
    extensions: *ref_0
  - &ref_5
    id: unmuteTtsBridgeReceiveKeepalive
    title: Unmute tts bridge receive keepalive
    description: Send keepalive on Unmute TTS Bridge
    type: receive
    messages:
      - &ref_15
        id: KeepaliveMessage
        contentType: application/json
        payload:
          - name: Keepalive Message
            description: Keep the WebSocket connection alive during silence.
            type: object
            properties:
              - name: type
                type: string
                description: keepalive
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          description: >-
            Prevents the connection from being closed due to inactivity. Send
            periodically during silence to maintain the session.
          required:
            - type
          properties:
            type:
              type: string
              const: keepalive
              x-parser-schema-id: <anonymous-schema-15>
          x-parser-schema-id: <anonymous-schema-14>
        title: Keepalive Message
        description: Keep the WebSocket connection alive during silence.
        example: |-
          {
            "type": "keepalive"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: KeepaliveMessage
    bindings: []
    extensions: *ref_0
  - &ref_6
    id: unmuteTtsBridgeSendReady
    title: Unmute tts bridge send ready
    description: Receive ready signal from Unmute TTS Bridge
    type: send
    messages:
      - &ref_16
        id: UnmuteTtsReadyMessage
        contentType: application/json
        payload:
          - name: Ready (Unmute TTS)
            description: Unmute TTS session is ready.
            type: object
            properties:
              - name: type
                type: string
                description: ready
                required: true
              - name: session_id
                type: string
                description: Unique session identifier.
                required: true
              - name: slng_request_id
                type: string
                description: SLNG request identifier echoed back for log correlation.
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          description: Session is ready for text input.
          required:
            - type
            - session_id
            - slng_request_id
          properties:
            type:
              type: string
              const: ready
              x-parser-schema-id: <anonymous-schema-55>
            session_id:
              type: string
              description: Unique session identifier.
              x-parser-schema-id: <anonymous-schema-56>
            slng_request_id:
              type: string
              description: SLNG request identifier echoed back for log correlation.
              x-parser-schema-id: <anonymous-schema-57>
          x-parser-schema-id: <anonymous-schema-54>
        title: Ready (Unmute TTS)
        description: Unmute TTS session is ready.
        example: |-
          {
            "type": "ready",
            "session_id": "1e1a9598-077e-4d9d-aba6-78af6363f27c",
            "slng_request_id": "2c9953d7-d4b4-4385-bb27-f64e0d979be5"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: UnmuteTtsReadyMessage
    bindings: []
    extensions: *ref_0
  - &ref_7
    id: unmuteTtsBridgeSendBinaryAudio
    title: Unmute tts bridge send binary audio
    description: Receive binary audio frame from Unmute TTS Bridge
    type: send
    messages:
      - &ref_17
        id: UnmuteTtsBinaryAudio
        contentType: application/octet-stream
        payload:
          - name: Binary Audio Frame
            description: Raw binary audio frame from Unmute TTS.
            type: object
            properties:
              - name: type
                type: string
                description: >-
                  Placeholder discriminator. The actual message is a raw binary
                  WebSocket frame, not JSON.
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          description: >-
            Raw binary audio data sent as a WebSocket binary frame. This is NOT
            a JSON message — it is a raw audio buffer. The encoding and sample
            rate match the values specified in the init message config. The
            object schema below is for documentation purposes only as required
            by the AsyncAPI tooling.
          required:
            - type
          properties:
            type:
              type: string
              const: binary
              description: >-
                Placeholder discriminator. The actual message is a raw binary
                WebSocket frame, not JSON.
              x-parser-schema-id: <anonymous-schema-59>
          x-parser-schema-id: <anonymous-schema-58>
        title: Binary Audio Frame
        description: Raw binary audio frame from Unmute TTS.
        example: >-
          "0000FF00000000FF00000000010101010101010100000000FFFFFFFFFFFEFEFDFEFEFEFEFDFDFEFEFEFEFEFEFEFEFEFFFFFFFFFEFEFEFEFF0001000001020303030303030303030201010000FFFFFEFDFDFDFDFEFFFFFFFF0001020303020201000000FFFDFCFBFAFAFBFAF9F8F7F7F7F6F6F4F2F2F3F7FC000406090F14191A19181715110E0A05FEF9F6F3F0EEECEBEBECEEF2F6F9FC0005090D0F101010100E0C080401"
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: UnmuteTtsBinaryAudio
    bindings: []
    extensions: *ref_0
  - &ref_8
    id: unmuteTtsBridgeSendFlushed
    title: Unmute tts bridge send flushed
    description: Receive flushed signal from Unmute TTS Bridge
    type: send
    messages:
      - &ref_18
        id: UnmuteTtsFlushedMessage
        contentType: application/json
        payload:
          - name: Flushed (Unmute TTS)
            description: All buffered audio has been flushed.
            type: object
            properties:
              - name: type
                type: string
                description: flushed
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          description: Confirms that all buffered audio has been sent.
          required:
            - type
          properties:
            type:
              type: string
              const: flushed
              x-parser-schema-id: <anonymous-schema-61>
          x-parser-schema-id: <anonymous-schema-60>
        title: Flushed (Unmute TTS)
        description: All buffered audio has been flushed.
        example: |-
          {
            "type": "flushed"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: UnmuteTtsFlushedMessage
    bindings: []
    extensions: *ref_0
  - &ref_9
    id: unmuteTtsBridgeSendAudioEnd
    title: Unmute tts bridge send audio end
    description: Receive audio end from Unmute TTS Bridge
    type: send
    messages:
      - &ref_19
        id: UnmuteTtsAudioEndMessage
        contentType: application/json
        payload:
          - name: Audio End (Unmute TTS)
            description: All audio for the current synthesis has been sent.
            type: object
            properties:
              - name: type
                type: string
                description: audio_end
                required: true
              - name: data
                type: object
                description: Audio-end event envelope.
                required: true
                properties:
                  - name: event_type
                    type: string
                    description: Audio-end event kind.
                    required: true
        headers: []
        jsonPayloadSchema:
          type: object
          description: Indicates all audio has been sent for the current synthesis.
          required:
            - type
            - data
          properties:
            type:
              type: string
              const: audio_end
              x-parser-schema-id: <anonymous-schema-63>
            data:
              type: object
              description: Audio-end event envelope.
              required:
                - event_type
              properties:
                event_type:
                  type: string
                  description: Audio-end event kind.
                  x-parser-schema-id: <anonymous-schema-65>
              x-parser-schema-id: <anonymous-schema-64>
          x-parser-schema-id: <anonymous-schema-62>
        title: Audio End (Unmute TTS)
        description: All audio for the current synthesis has been sent.
        example: |-
          {
            "type": "audio_end",
            "data": {
              "event_type": "final"
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: UnmuteTtsAudioEndMessage
    bindings: []
    extensions: *ref_0
  - &ref_10
    id: unmuteTtsBridgeSendError
    title: Unmute tts bridge send error
    description: Receive error from Unmute TTS Bridge
    type: send
    messages:
      - &ref_20
        id: UnmuteTtsErrorMessage
        contentType: application/json
        payload:
          - name: Error (Unmute TTS)
            description: Error occurred during Unmute TTS session.
            type: object
            properties:
              - name: type
                type: string
                description: error
                required: true
              - name: data
                type: object
                description: Structured error envelope.
                required: true
                properties:
                  - name: request_id
                    type: string
                    description: SLNG request identifier for this error.
                    required: true
                  - name: message
                    type: string
                    description: Human-readable error description.
                    required: true
                  - name: code
                    type: string
                    description: Error code.
                    enumValues:
                      - auth_error
                      - config_error
                      - rate_limit
                      - provider_error
                    required: true
              - name: message
                type: string
                description: >-
                  Human-readable error description (duplicated from
                  `data.message` for backward compatibility).
                required: true
              - name: code
                type: string
                description: >-
                  Error code (duplicated from `data.code` for backward
                  compatibility).
                enumValues:
                  - auth_error
                  - config_error
                  - rate_limit
                  - provider_error
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          description: >-
            Error occurred during synthesis. The error details live under
            `data`; `message` and `code` are duplicated at the top level for
            backward compatibility.
          required:
            - type
            - data
            - message
            - code
          properties:
            type:
              type: string
              const: error
              x-parser-schema-id: <anonymous-schema-67>
            data:
              type: object
              description: Structured error envelope.
              required:
                - request_id
                - message
                - code
              properties:
                request_id:
                  type: string
                  description: SLNG request identifier for this error.
                  x-parser-schema-id: <anonymous-schema-69>
                message:
                  type: string
                  description: Human-readable error description.
                  x-parser-schema-id: <anonymous-schema-70>
                code:
                  type: string
                  description: Error code.
                  enum:
                    - auth_error
                    - config_error
                    - rate_limit
                    - provider_error
                  x-parser-schema-id: <anonymous-schema-71>
              x-parser-schema-id: <anonymous-schema-68>
            message:
              type: string
              description: >-
                Human-readable error description (duplicated from `data.message`
                for backward compatibility).
              x-parser-schema-id: <anonymous-schema-72>
            code:
              type: string
              description: >-
                Error code (duplicated from `data.code` for backward
                compatibility).
              enum:
                - auth_error
                - config_error
                - rate_limit
                - provider_error
              x-parser-schema-id: <anonymous-schema-73>
          x-parser-schema-id: <anonymous-schema-66>
        title: Error (Unmute TTS)
        description: Error occurred during Unmute TTS session.
        example: |-
          {
            "type": "error",
            "data": {
              "request_id": "req_abc123",
              "message": "Upstream service unavailable",
              "code": "provider_error"
            },
            "message": "Upstream service unavailable",
            "code": "provider_error"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: UnmuteTtsErrorMessage
    bindings: []
    extensions: *ref_0
sendOperations:
  - *ref_1
  - *ref_2
  - *ref_3
  - *ref_4
  - *ref_5
receiveOperations:
  - *ref_6
  - *ref_7
  - *ref_8
  - *ref_9
  - *ref_10
sendMessages:
  - *ref_11
  - *ref_12
  - *ref_13
  - *ref_14
  - *ref_15
receiveMessages:
  - *ref_16
  - *ref_17
  - *ref_18
  - *ref_19
  - *ref_20
extensions:
  - id: x-parser-unique-object-id
    value: /v1/bridges/unmute/tts/{model_variant}
securitySchemes:
  - id: bearer
    name: bearer
    type: http
    description: >
      API key issued by SLNG. Pass as `Authorization: Bearer <token>` in the
      WebSocket upgrade request headers.
    scheme: bearer
    extensions: []

````