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

# Coda (Indonesian)

> Text-to-Speech API for generating Bahasa Indonesian speech using Rime Coda TTS model. Establishes a WebSocket connection for real-time text-to-speech.



## AsyncAPI

````yaml api-reference/asyncapi/tts-slng.asyncapi.yaml /v1/tts/slng/rime/coda:0-id
id: /v1/tts/slng/rime/coda:0-id
title: Coda (Indonesian)
description: >-
  Text-to-Speech API for generating Bahasa Indonesian speech using Rime Coda TTS
  model. Establishes a WebSocket connection for real-time text-to-speech.
servers:
  - id: production
    protocol: wss
    host: api.slng.ai
    bindings: []
    variables: []
address: /v1/tts/slng/rime/coda:0-id
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. Available
              regions: `ap-southeast-2`.
            enum:
              - asia-southeast2
            x-parser-schema-id: <anonymous-schema-210>
        x-parser-schema-id: WebsocketHeadersSlngCoda0Id
    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. Available
              regions: `ap-southeast-2`.
            enumValues:
              - asia-southeast2
            required: false
operations:
  - &ref_1
    id: ttsRimeCoda0IdReceiveInit
    title: Tts rime coda0 id receive init
    description: Initialize session on Coda (Indonesian)
    type: receive
    messages:
      - &ref_8
        id: SlngRimeCoda0IdTtsInitRequest
        contentType: application/json
        payload:
          - name: Init Request (Rime Coda Indonesian)
            description: Initialize a Rime Coda Indonesian TTS session.
            type: object
            properties:
              - name: type
                type: string
                description: init
                required: true
              - name: model
                type: string
                description: The model identifier.
                required: true
              - name: speaker
                type: string
                description: Voice speaker ID for Rime Coda Indonesian.
                enumValues:
                  - pujianti_plesmita
                  - siswoko_sigit
                  - taryadi_dani
                  - usmany_tatianna
                required: true
              - name: config
                type: object
                description: Audio configuration settings for Rime Coda TTS.
                required: false
                properties:
                  - name: sample_rate
                    type: integer
                    description: Audio sample rate in Hz. Values above 24000 are upsampled.
                    enumValues:
                      - 8000
                      - 16000
                      - 22050
                      - 24000
                      - 44100
                      - 48000
                      - 96000
                    required: false
                  - name: encoding
                    type: string
                    description: Audio encoding format.
                    enumValues:
                      - mp3
                      - wav
                      - pcm
                      - linear16
                      - ulaw
                    required: false
                  - name: speed
                    type: number
                    description: >-
                      Speech rate multiplier (0.25 = half speed, 2.0 = double
                      speed).
                    required: false
                  - name: segment
                    type: boolean
                    description: Enable segment markers in output.
                    required: false
                  - name: modelId
                    type: string
                    description: Rime Coda model identifier.
                    enumValues:
                      - coda
                    required: false
              - name: top_p
                type: number
                description: >-
                  The top p. Float that controls the cumulative probability of
                  the top tokens to consider. Must be in (0, 1]. Set to 1 to
                  consider all tokens.
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          description: Initialize a Rime Coda Indonesian TTS session.
          required:
            - type
            - model
            - speaker
          properties:
            type:
              type: string
              const: init
              x-parser-schema-id: <anonymous-schema-85>
            model:
              type: string
              description: The model identifier.
              x-parser-schema-id: <anonymous-schema-86>
            speaker:
              type: string
              description: Voice speaker ID for Rime Coda Indonesian.
              default: pujianti_plesmita
              enum:
                - pujianti_plesmita
                - siswoko_sigit
                - taryadi_dani
                - usmany_tatianna
              x-parser-schema-id: SlngRimeCoda0IdSpeaker
            config:
              type: object
              description: Audio configuration settings for Rime Coda TTS.
              properties:
                sample_rate:
                  type: integer
                  description: Audio sample rate in Hz. Values above 24000 are upsampled.
                  enum:
                    - 8000
                    - 16000
                    - 22050
                    - 24000
                    - 44100
                    - 48000
                    - 96000
                  default: 24000
                  x-parser-schema-id: <anonymous-schema-87>
                encoding:
                  type: string
                  description: Audio encoding format.
                  enum:
                    - mp3
                    - wav
                    - pcm
                    - linear16
                    - ulaw
                  default: mp3
                  x-parser-schema-id: <anonymous-schema-88>
                speed:
                  type: number
                  description: >-
                    Speech rate multiplier (0.25 = half speed, 2.0 = double
                    speed).
                  minimum: 0.25
                  maximum: 2
                  default: 1
                  x-parser-schema-id: <anonymous-schema-89>
                segment:
                  type: boolean
                  default: false
                  description: Enable segment markers in output.
                  x-parser-schema-id: <anonymous-schema-90>
                modelId:
                  type: string
                  description: Rime Coda model identifier.
                  enum:
                    - coda
                  default: coda
                  x-parser-schema-id: <anonymous-schema-91>
              x-parser-schema-id: SlngRimeCodaTtsConfig
            top_p:
              type: number
              format: float
              default: 1
              description: >-
                The top p. Float that controls the cumulative probability of the
                top tokens to consider. Must be in (0, 1]. Set to 1 to consider
                all tokens.
              x-parser-schema-id: <anonymous-schema-92>
          x-parser-schema-id: <anonymous-schema-84>
        title: Init Request (Rime Coda Indonesian)
        description: Initialize a Rime Coda Indonesian TTS session.
        example: |-
          {
            "type": "init",
            "model": "rime/coda:0-id",
            "speaker": "pujianti_plesmita",
            "config": {
              "sample_rate": 24000,
              "encoding": "mp3"
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: SlngRimeCoda0IdTtsInitRequest
    bindings: []
    extensions: &ref_0
      - id: x-parser-unique-object-id
        value: /v1/tts/slng/rime/coda:0-id
  - &ref_2
    id: ttsRimeCoda0IdReceiveText
    title: Tts rime coda0 id receive text
    description: Send text to Coda (Indonesian)
    type: receive
    messages:
      - &ref_9
        id: SlngRimeCoda0IdTtsTextMessage
        contentType: application/json
        payload:
          - name: Text Message (Rime Coda Indonesian)
            description: Send text to synthesize using Rime Coda Indonesian.
            type: object
            properties:
              - name: type
                type: string
                description: text
                required: true
              - name: text
                type: string
                description: The text to synthesize.
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          description: >-
            Send text to synthesize into audio output using Rime Coda. Text
            accumulates in a buffer until punctuation is encountered. Synthesis
            begins when sufficient tokens exist for natural prosody. Use the
            flush message to force synthesis of buffered content.
          required:
            - type
            - text
          properties:
            type:
              type: string
              const: text
              x-parser-schema-id: <anonymous-schema-94>
            text:
              type: string
              description: The text to synthesize.
              x-parser-schema-id: <anonymous-schema-95>
          x-parser-schema-id: <anonymous-schema-93>
        title: Text Message (Rime Coda Indonesian)
        description: Send text to synthesize using Rime Coda Indonesian.
        example: |-
          {
            "type": "text",
            "text": "Halo dari Rime Coda Indonesia."
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: SlngRimeCoda0IdTtsTextMessage
    bindings: []
    extensions: *ref_0
  - &ref_3
    id: ttsRimeCoda0IdReceiveFlush
    title: Tts rime coda0 id receive flush
    description: Flush buffered output on Coda (Indonesian)
    type: receive
    messages:
      - &ref_10
        id: TtsFlushMessage
        contentType: application/json
        payload:
          - name: Flush Message
            description: Force any buffered text/audio to be finalized and delivered.
            type: object
            properties:
              - name: type
                type: string
                description: flush
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          description: Force any buffered text/audio to be finalized and delivered.
          required:
            - type
          properties:
            type:
              type: string
              const: flush
              x-parser-schema-id: <anonymous-schema-12>
          x-parser-schema-id: <anonymous-schema-11>
        title: Flush Message
        description: Force any buffered text/audio to be finalized and delivered.
        example: |-
          {
            "type": "flush"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: TtsFlushMessage
    bindings: []
    extensions: *ref_0
  - &ref_4
    id: ttsRimeCoda0IdReceiveClear
    title: Tts rime coda0 id receive clear
    description: Clear queued output on Coda (Indonesian)
    type: receive
    messages:
      - &ref_11
        id: TtsClearMessage
        contentType: application/json
        payload:
          - name: Clear Message
            description: Clear any queued text/audio from the current session.
            type: object
            properties:
              - name: type
                type: string
                description: clear
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          description: Clear any queued text/audio from the current session.
          required:
            - type
          properties:
            type:
              type: string
              const: clear
              x-parser-schema-id: <anonymous-schema-14>
          x-parser-schema-id: <anonymous-schema-13>
        title: Clear Message
        description: Clear any queued text/audio from the current session.
        example: |-
          {
            "type": "clear"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: TtsClearMessage
    bindings: []
    extensions: *ref_0
  - &ref_5
    id: ttsRimeCoda0IdReceiveClose
    title: Tts rime coda0 id receive close
    description: Close session on Coda (Indonesian)
    type: receive
    messages:
      - &ref_12
        id: TtsCloseMessage
        contentType: application/json
        payload:
          - name: Close Message
            description: Close the session and stop any further audio.
            type: object
            properties:
              - name: type
                type: string
                description: close
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          description: Close the session and stop any further audio.
          required:
            - type
          properties:
            type:
              type: string
              const: close
              x-parser-schema-id: <anonymous-schema-16>
          x-parser-schema-id: <anonymous-schema-15>
        title: Close Message
        description: Close the session and stop any further audio.
        example: |-
          {
            "type": "close"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: TtsCloseMessage
    bindings: []
    extensions: *ref_0
  - &ref_6
    id: ttsRimeCoda0IdSendAudioChunk
    title: Tts rime coda0 id send audio chunk
    description: Receive audio chunk from Coda (Indonesian)
    type: send
    messages:
      - &ref_13
        id: SlngRimeCodaTtsAudioChunk
        contentType: application/json
        payload:
          - name: Audio Chunk (Rime Coda)
            description: Chunk of base64-encoded audio data from Rime Coda TTS.
            type: object
            properties:
              - name: type
                type: string
                description: audio_chunk
                required: true
              - name: data
                type: string
                description: Base64-encoded audio data.
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          description: Chunk of base64-encoded audio data from Rime Coda TTS.
          required:
            - type
            - data
          properties:
            type:
              type: string
              const: audio_chunk
              x-parser-schema-id: <anonymous-schema-97>
            data:
              type: string
              format: byte
              description: Base64-encoded audio data.
              x-parser-schema-id: <anonymous-schema-98>
          x-parser-schema-id: <anonymous-schema-96>
        title: Audio Chunk (Rime Coda)
        description: Chunk of base64-encoded audio data from Rime Coda TTS.
        example: |-
          {
            "type": "audio_chunk",
            "data": "UklGRiQAAABXQVZFZm10IBAAAAABAAEA..."
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: SlngRimeCodaTtsAudioChunk
    bindings: []
    extensions: *ref_0
  - &ref_7
    id: ttsRimeCoda0IdSendError
    title: Tts rime coda0 id send error
    description: Receive error from Coda (Indonesian)
    type: send
    messages:
      - &ref_14
        id: SlngRimeCodaTtsError
        contentType: application/json
        payload:
          - name: Error Response (Rime Coda)
            description: Indicates an error occurred during Rime Coda TTS synthesis.
            type: object
            properties:
              - name: type
                type: string
                description: error
                required: true
              - name: code
                type: string
                description: Error code from the provider.
                required: false
              - name: message
                type: string
                description: Human-readable error description.
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          description: Indicates an error occurred during Rime Coda TTS synthesis.
          required:
            - type
            - message
          properties:
            type:
              type: string
              const: error
              x-parser-schema-id: <anonymous-schema-100>
            code:
              type: string
              description: Error code from the provider.
              x-parser-schema-id: <anonymous-schema-101>
            message:
              type: string
              description: Human-readable error description.
              x-parser-schema-id: <anonymous-schema-102>
          x-parser-schema-id: <anonymous-schema-99>
        title: Error Response (Rime Coda)
        description: Indicates an error occurred during Rime Coda TTS synthesis.
        example: |-
          {
            "type": "error",
            "code": "invalid_speaker",
            "message": "Invalid speaker for Rime Coda Indonesian."
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: SlngRimeCodaTtsError
    bindings: []
    extensions: *ref_0
sendOperations:
  - *ref_1
  - *ref_2
  - *ref_3
  - *ref_4
  - *ref_5
receiveOperations:
  - *ref_6
  - *ref_7
sendMessages:
  - *ref_8
  - *ref_9
  - *ref_10
  - *ref_11
  - *ref_12
receiveMessages:
  - *ref_13
  - *ref_14
extensions:
  - id: x-parser-unique-object-id
    value: /v1/tts/slng/rime/coda:0-id
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: []

````