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

# Speechmatics Realtime v2 (Indonesian)

> Real-time Indonesian speech-to-text from SLNG-hosted Speechmatics over WebSocket. Stream binary audio and receive partial and final transcripts with word timing, confidence, and optional diarization.



## AsyncAPI

````yaml api-reference/asyncapi/stt-slng.asyncapi.yaml /v1/stt/slng/speechmatics/realtime:v2
id: /v1/stt/slng/speechmatics/realtime:v2
title: Speechmatics Realtime v2 (Indonesian)
description: >-
  Real-time Indonesian speech-to-text from SLNG-hosted Speechmatics over
  WebSocket. Stream binary audio and receive partial and final transcripts with
  word timing, confidence, and optional diarization.
servers:
  - id: production
    protocol: wss
    host: api.slng.ai
    bindings: []
    variables: []
address: /v1/stt/slng/speechmatics/realtime:v2
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: `asia-southeast2`.
            enum:
              - asia-southeast2
            x-parser-schema-id: <anonymous-schema-322>
        x-parser-schema-id: WebsocketHeadersSlngSpeechmaticsRealtime
    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: `asia-southeast2`.
            enumValues:
              - asia-southeast2
            required: false
operations:
  - &ref_1
    id: sttSlngSpeechmaticsRealtimeV2ReceiveInit
    title: Stt slng speechmatics realtime v2 receive init
    description: Initialize session on Speechmatics Realtime v2
    type: receive
    messages:
      - &ref_9
        id: SlngSpeechmaticsRealtimeInitRequest
        contentType: application/json
        payload:
          - name: Init Request (Speechmatics)
            description: >-
              Initialize an SLNG-hosted Speechmatics Realtime session with
              recognition configuration.
            type: object
            properties:
              - name: type
                type: string
                description: init
                required: true
              - name: config
                type: object
                description: Speechmatics recognition configuration options.
                required: false
                properties:
                  - name: language
                    type: string
                    description: >-
                      ISO language code for transcription. SLNG-hosted
                      Speechmatics currently supports Indonesian only.
                    enumValues:
                      - id
                    required: false
                  - name: encoding
                    type: string
                    description: Raw audio encoding for binary frames.
                    enumValues:
                      - pcm_s16le
                      - pcm_f32le
                      - mulaw
                      - linear16
                    required: false
                  - name: sample_rate
                    type: integer
                    description: Audio sample rate in Hz.
                    required: false
                  - name: operating_point
                    type: string
                    description: Quality level.
                    enumValues:
                      - standard
                      - enhanced
                    required: false
                  - name: domain
                    type: string
                    description: Specialized transcription domain.
                    required: false
                  - name: output_locale
                    type: string
                    description: Locale for formatted output.
                    required: false
                  - name: additional_vocab
                    type: array
                    description: >-
                      Custom vocabulary entries. Each entry is either a string,
                      or an object of the form `{ content, sounds_like }`.
                    required: false
                    properties:
                      - name: item
                        type: string
                        required: false
                  - name: diarization
                    type: string
                    description: Diarization mode.
                    enumValues:
                      - none
                      - speaker
                      - channel
                      - channel_and_speaker
                    required: false
                  - name: max_delay
                    type: number
                    description: Maximum final transcript delay in seconds.
                    required: false
                  - name: max_delay_mode
                    type: string
                    description: >-
                      Whether max_delay is enforced flexibly or as a fixed
                      bound.
                    enumValues:
                      - flexible
                      - fixed
                    required: false
                  - name: enable_partials
                    type: boolean
                    description: Enable partial transcript messages.
                    required: false
                  - name: enable_entities
                    type: boolean
                    description: Enable entity detection.
                    required: false
                  - name: remove_disfluencies
                    type: boolean
                    description: Remove disfluencies from transcripts.
                    required: false
                  - name: channel_diarization_labels
                    type: array
                    description: Channel labels for channel diarization.
                    required: false
                    properties:
                      - name: item
                        type: string
                        required: false
                  - name: volume_threshold
                    type: number
                    description: Lower volume limit for audio filtering.
                    required: false
                  - name: end_of_utterance_silence_trigger
                    type: number
                    description: >-
                      Silence duration in seconds before emitting an
                      end-of-utterance signal. Zero disables it.
                    required: false
        headers: []
        jsonPayloadSchema:
          type: object
          description: >-
            Initialize an SLNG-hosted Speechmatics Realtime session. Must be the
            first message, before streaming audio.
          required:
            - type
          properties:
            type:
              type: string
              const: init
              x-parser-schema-id: <anonymous-schema-227>
            config:
              type: object
              description: Speechmatics recognition configuration options.
              properties:
                language:
                  type: string
                  description: >-
                    ISO language code for transcription. SLNG-hosted
                    Speechmatics currently supports Indonesian only.
                  enum:
                    - id
                  default: id
                  x-parser-schema-id: <anonymous-schema-228>
                encoding:
                  type: string
                  description: Raw audio encoding for binary frames.
                  enum:
                    - pcm_s16le
                    - pcm_f32le
                    - mulaw
                    - linear16
                  default: pcm_s16le
                  x-parser-schema-id: <anonymous-schema-229>
                sample_rate:
                  type: integer
                  description: Audio sample rate in Hz.
                  default: 16000
                  x-parser-schema-id: <anonymous-schema-230>
                operating_point:
                  type: string
                  description: Quality level.
                  enum:
                    - standard
                    - enhanced
                  default: standard
                  x-parser-schema-id: <anonymous-schema-231>
                domain:
                  type: string
                  description: Specialized transcription domain.
                  x-parser-schema-id: <anonymous-schema-232>
                output_locale:
                  type: string
                  description: Locale for formatted output.
                  x-parser-schema-id: <anonymous-schema-233>
                additional_vocab:
                  type: array
                  description: >-
                    Custom vocabulary entries. Each entry is either a string, or
                    an object of the form `{ content, sounds_like }`.
                  items:
                    type: string
                    x-parser-schema-id: <anonymous-schema-235>
                  x-parser-schema-id: <anonymous-schema-234>
                diarization:
                  type: string
                  description: Diarization mode.
                  enum:
                    - none
                    - speaker
                    - channel
                    - channel_and_speaker
                  default: none
                  x-parser-schema-id: <anonymous-schema-236>
                max_delay:
                  type: number
                  description: Maximum final transcript delay in seconds.
                  minimum: 0.7
                  maximum: 4
                  default: 4
                  x-parser-schema-id: <anonymous-schema-237>
                max_delay_mode:
                  type: string
                  description: Whether max_delay is enforced flexibly or as a fixed bound.
                  enum:
                    - flexible
                    - fixed
                  default: flexible
                  x-parser-schema-id: <anonymous-schema-238>
                enable_partials:
                  type: boolean
                  description: Enable partial transcript messages.
                  default: false
                  x-parser-schema-id: <anonymous-schema-239>
                enable_entities:
                  type: boolean
                  description: Enable entity detection.
                  default: false
                  x-parser-schema-id: <anonymous-schema-240>
                remove_disfluencies:
                  type: boolean
                  description: Remove disfluencies from transcripts.
                  default: false
                  x-parser-schema-id: <anonymous-schema-241>
                channel_diarization_labels:
                  type: array
                  description: Channel labels for channel diarization.
                  items:
                    type: string
                    x-parser-schema-id: <anonymous-schema-243>
                  x-parser-schema-id: <anonymous-schema-242>
                volume_threshold:
                  type: number
                  description: Lower volume limit for audio filtering.
                  minimum: 0
                  x-parser-schema-id: <anonymous-schema-244>
                end_of_utterance_silence_trigger:
                  type: number
                  description: >-
                    Silence duration in seconds before emitting an
                    end-of-utterance signal. Zero disables it.
                  minimum: 0
                  x-parser-schema-id: <anonymous-schema-245>
              x-parser-schema-id: SlngSpeechmaticsRealtimeConfig
          x-parser-schema-id: <anonymous-schema-226>
        title: Init Request (Speechmatics)
        description: >-
          Initialize an SLNG-hosted Speechmatics Realtime session with
          recognition configuration.
        example: |-
          {
            "type": "init",
            "config": {
              "language": "id",
              "encoding": "pcm_s16le",
              "sample_rate": 16000,
              "operating_point": "standard",
              "enable_partials": true
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: SlngSpeechmaticsRealtimeInitRequest
    bindings: []
    extensions: &ref_0
      - id: x-parser-unique-object-id
        value: /v1/stt/slng/speechmatics/realtime:v2
  - &ref_2
    id: sttSlngSpeechmaticsRealtimeV2ReceiveAudio
    title: Stt slng speechmatics realtime v2 receive audio
    description: Send audio frame to Speechmatics Realtime v2
    type: receive
    messages:
      - &ref_10
        id: SlngSpeechmaticsRealtimeBinaryAudio
        contentType: application/octet-stream
        payload:
          - type: string
            format: binary
            description: Stream a raw binary audio frame to be transcribed.
            x-parser-schema-id: <anonymous-schema-246>
            name: Binary Audio Frame
        headers: []
        jsonPayloadSchema:
          type: string
          format: binary
          description: >-
            Raw binary audio data in the encoding declared at init (default
            linear16 PCM at 16kHz). Sent as a binary WebSocket frame — no JSON
            envelope, no base64 encoding.
          x-parser-schema-id: <anonymous-schema-246>
        title: Binary Audio Frame
        description: Stream a raw binary audio frame to be transcribed.
        example: '"0000FF00000000FF0000000001010101010101010000"'
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: SlngSpeechmaticsRealtimeBinaryAudio
    bindings: []
    extensions: *ref_0
  - &ref_3
    id: sttSlngSpeechmaticsRealtimeV2ReceiveFinalize
    title: Stt slng speechmatics realtime v2 receive finalize
    description: Force end of utterance on Speechmatics Realtime v2
    type: receive
    messages:
      - &ref_11
        id: SttFinalizeMessage
        contentType: application/json
        payload:
          - name: Finalize Message
            description: >-
              Force-finalize buffered audio tokens without closing the
              connection.
            type: object
            properties:
              - name: type
                type: string
                description: finalize
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          description: >-
            Mid-stream flush — forces the server to finalize any buffered audio
            and return results. The connection remains open for further audio.
          required:
            - type
          properties:
            type:
              type: string
              const: finalize
              x-parser-schema-id: <anonymous-schema-9>
          x-parser-schema-id: <anonymous-schema-8>
        title: Finalize Message
        description: Force-finalize buffered audio tokens without closing the connection.
        example: |-
          {
            "type": "finalize"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: SttFinalizeMessage
    bindings: []
    extensions: *ref_0
  - &ref_4
    id: sttSlngSpeechmaticsRealtimeV2ReceiveClose
    title: Stt slng speechmatics realtime v2 receive close
    description: Close audio stream on Speechmatics Realtime v2
    type: receive
    messages:
      - &ref_12
        id: SttCloseMessage
        contentType: application/json
        payload:
          - name: Close Message
            description: Signal end of audio stream and close the connection.
            type: object
            properties:
              - name: type
                type: string
                description: close
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          description: >-
            Signal that no more audio will be sent. The server processes
            remaining audio, sends final results, then closes the connection.
          required:
            - type
          properties:
            type:
              type: string
              const: close
              x-parser-schema-id: <anonymous-schema-11>
          x-parser-schema-id: <anonymous-schema-10>
        title: Close Message
        description: Signal end of audio stream and close the connection.
        example: |-
          {
            "type": "close"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: SttCloseMessage
    bindings: []
    extensions: *ref_0
  - &ref_5
    id: sttSlngSpeechmaticsRealtimeV2SendPartialTranscript
    title: Stt slng speechmatics realtime v2 send partial transcript
    description: Receive partial transcript from Speechmatics Realtime v2
    type: send
    messages:
      - &ref_13
        id: SlngSpeechmaticsRealtimePartialTranscript
        contentType: application/json
        payload:
          - name: Partial Transcript
            description: Interim transcription result (when partials are enabled).
            type: object
            properties:
              - name: type
                type: string
                description: partial_transcript
                required: true
              - name: transcript
                type: string
                description: Transcribed text so far.
                required: true
              - name: start_time
                type: number
                description: Start time of the segment in seconds.
                required: false
              - name: end_time
                type: number
                description: End time of the segment in seconds.
                required: false
              - name: confidence
                type: number
                description: Confidence score (0-1).
                required: false
              - name: language
                type: string
                description: Detected language of the segment.
                required: false
              - name: speaker
                type: string
                description: Speaker label, when diarization is enabled.
                required: false
              - name: channel
                type: string
                description: Channel label, when channel diarization is enabled.
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          description: >-
            Interim transcription result. Emitted only when partials are
            enabled.
          required:
            - type
            - transcript
          properties:
            type:
              type: string
              const: partial_transcript
              x-parser-schema-id: <anonymous-schema-248>
            transcript:
              type: string
              description: Transcribed text so far.
              x-parser-schema-id: <anonymous-schema-249>
            start_time:
              type: number
              description: Start time of the segment in seconds.
              x-parser-schema-id: <anonymous-schema-250>
            end_time:
              type: number
              description: End time of the segment in seconds.
              x-parser-schema-id: <anonymous-schema-251>
            confidence:
              type: number
              description: Confidence score (0-1).
              x-parser-schema-id: <anonymous-schema-252>
            language:
              type: string
              description: Detected language of the segment.
              x-parser-schema-id: <anonymous-schema-253>
            speaker:
              type: string
              description: Speaker label, when diarization is enabled.
              x-parser-schema-id: <anonymous-schema-254>
            channel:
              type: string
              description: Channel label, when channel diarization is enabled.
              x-parser-schema-id: <anonymous-schema-255>
          x-parser-schema-id: <anonymous-schema-247>
        title: Partial Transcript
        description: Interim transcription result (when partials are enabled).
        example: |-
          {
            "type": "partial_transcript",
            "transcript": "halo apa",
            "start_time": 0,
            "end_time": 0.8,
            "confidence": 0.82
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: SlngSpeechmaticsRealtimePartialTranscript
    bindings: []
    extensions: *ref_0
  - &ref_6
    id: sttSlngSpeechmaticsRealtimeV2SendFinalTranscript
    title: Stt slng speechmatics realtime v2 send final transcript
    description: Receive final transcript from Speechmatics Realtime v2
    type: send
    messages:
      - &ref_14
        id: SlngSpeechmaticsRealtimeFinalTranscript
        contentType: application/json
        payload:
          - name: Final Transcript
            description: Finalized transcription segment.
            type: object
            properties:
              - name: type
                type: string
                description: final_transcript
                required: true
              - name: transcript
                type: string
                description: Finalized transcribed text.
                required: true
              - name: start_time
                type: number
                description: Start time of the segment in seconds.
                required: false
              - name: end_time
                type: number
                description: End time of the segment in seconds.
                required: false
              - name: confidence
                type: number
                description: Confidence score (0-1).
                required: false
              - name: language
                type: string
                description: Detected language of the segment.
                required: false
              - name: speaker
                type: string
                description: Speaker label, when diarization is enabled.
                required: false
              - name: channel
                type: string
                description: Channel label, when channel diarization is enabled.
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          description: >-
            Finalized transcription segment with timing and optional diarization
            metadata.
          required:
            - type
            - transcript
          properties:
            type:
              type: string
              const: final_transcript
              x-parser-schema-id: <anonymous-schema-257>
            transcript:
              type: string
              description: Finalized transcribed text.
              x-parser-schema-id: <anonymous-schema-258>
            start_time:
              type: number
              description: Start time of the segment in seconds.
              x-parser-schema-id: <anonymous-schema-259>
            end_time:
              type: number
              description: End time of the segment in seconds.
              x-parser-schema-id: <anonymous-schema-260>
            confidence:
              type: number
              description: Confidence score (0-1).
              x-parser-schema-id: <anonymous-schema-261>
            language:
              type: string
              description: Detected language of the segment.
              x-parser-schema-id: <anonymous-schema-262>
            speaker:
              type: string
              description: Speaker label, when diarization is enabled.
              x-parser-schema-id: <anonymous-schema-263>
            channel:
              type: string
              description: Channel label, when channel diarization is enabled.
              x-parser-schema-id: <anonymous-schema-264>
          x-parser-schema-id: <anonymous-schema-256>
        title: Final Transcript
        description: Finalized transcription segment.
        example: |-
          {
            "type": "final_transcript",
            "transcript": "Halo, apa kabar?",
            "start_time": 0,
            "end_time": 1.4,
            "confidence": 0.95
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: SlngSpeechmaticsRealtimeFinalTranscript
    bindings: []
    extensions: *ref_0
  - &ref_7
    id: sttSlngSpeechmaticsRealtimeV2SendUtteranceEnd
    title: Stt slng speechmatics realtime v2 send utterance end
    description: Receive end-of-utterance from Speechmatics Realtime v2
    type: send
    messages:
      - &ref_15
        id: SlngSpeechmaticsRealtimeUtteranceEnd
        contentType: application/json
        payload:
          - name: Utterance End
            description: End-of-utterance signal driven by the silence trigger.
            type: object
            properties:
              - name: type
                type: string
                description: utterance_end
                required: true
              - name: last_word_end
                type: number
                description: End time of the last word in the utterance, in seconds.
                required: false
              - name: channel
                type: string
                description: Channel label, when channel diarization is enabled.
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          description: >-
            Signals the end of an utterance, emitted when the end-of-utterance
            silence trigger is configured.
          required:
            - type
          properties:
            type:
              type: string
              const: utterance_end
              x-parser-schema-id: <anonymous-schema-266>
            last_word_end:
              type: number
              description: End time of the last word in the utterance, in seconds.
              x-parser-schema-id: <anonymous-schema-267>
            channel:
              type: string
              description: Channel label, when channel diarization is enabled.
              x-parser-schema-id: <anonymous-schema-268>
          x-parser-schema-id: <anonymous-schema-265>
        title: Utterance End
        description: End-of-utterance signal driven by the silence trigger.
        example: |-
          {
            "type": "utterance_end",
            "last_word_end": 1.4
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: SlngSpeechmaticsRealtimeUtteranceEnd
    bindings: []
    extensions: *ref_0
  - &ref_8
    id: sttSlngSpeechmaticsRealtimeV2SendError
    title: Stt slng speechmatics realtime v2 send error
    description: Receive error from Speechmatics Realtime v2
    type: send
    messages:
      - &ref_16
        id: SlngSpeechmaticsRealtimeError
        contentType: application/json
        payload:
          - name: Error Response
            description: Indicates an error occurred during recognition.
            type: object
            properties:
              - name: type
                type: string
                description: error
                required: true
              - name: code
                type: string
                description: >-
                  Provider error type (e.g., invalid_audio_type,
                  not_authorised).
                required: false
              - name: message
                type: string
                description: Human-readable error description.
                required: true
              - name: status
                type: integer
                description: Provider status code, when available.
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          description: Indicates an error occurred during recognition.
          required:
            - type
            - message
          properties:
            type:
              type: string
              const: error
              x-parser-schema-id: <anonymous-schema-270>
            code:
              type: string
              description: Provider error type (e.g., invalid_audio_type, not_authorised).
              x-parser-schema-id: <anonymous-schema-271>
            message:
              type: string
              description: Human-readable error description.
              x-parser-schema-id: <anonymous-schema-272>
            status:
              type: integer
              description: Provider status code, when available.
              x-parser-schema-id: <anonymous-schema-273>
          x-parser-schema-id: <anonymous-schema-269>
        title: Error Response
        description: Indicates an error occurred during recognition.
        example: |-
          {
            "type": "error",
            "code": "invalid_audio_type",
            "message": "Unsupported audio encoding",
            "status": 400
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: SlngSpeechmaticsRealtimeError
    bindings: []
    extensions: *ref_0
sendOperations:
  - *ref_1
  - *ref_2
  - *ref_3
  - *ref_4
receiveOperations:
  - *ref_5
  - *ref_6
  - *ref_7
  - *ref_8
sendMessages:
  - *ref_9
  - *ref_10
  - *ref_11
  - *ref_12
receiveMessages:
  - *ref_13
  - *ref_14
  - *ref_15
  - *ref_16
extensions:
  - id: x-parser-unique-object-id
    value: /v1/stt/slng/speechmatics/realtime:v2
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: []

````