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

> Real-time speech-to-text transcription with 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-speechmatics.asyncapi.yaml /v1/stt/speechmatics/realtime:v2
id: /v1/stt/speechmatics/realtime:v2
title: Speechmatics Realtime v2
description: >-
  Real-time speech-to-text transcription with 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: []
  - id: staging
    protocol: wss
    host: stageapi.slng.ai
    bindings: []
    variables: []
address: /v1/stt/speechmatics/realtime:v2
parameters: []
bindings:
  - protocol: ws
    version: latest
    value:
      method: GET
      headers:
        type: object
        properties:
          X-World-Part-Override:
            type: string
            description: >-
              Target world part override. Auto-selected if not provided.
              Available world parts: `ap`, `eu`.
            enum:
              - ap
              - eu
            x-parser-schema-id: <anonymous-schema-61>
        x-parser-schema-id: WebsocketHeadersSpeechmatics
    schemaProperties:
      - name: method
        type: string
        description: GET
        required: false
      - name: headers
        type: object
        required: false
        properties:
          - name: X-World-Part-Override
            type: string
            description: >-
              Target world part override. Auto-selected if not provided.
              Available world parts: `ap`, `eu`.
            enumValues:
              - ap
              - eu
            required: false
operations:
  - &ref_1
    id: sttSpeechmaticsRealtimeV2ReceiveInit
    title: Stt speechmatics realtime v2 receive init
    description: Initialize session on Speechmatics Realtime v2
    type: receive
    messages:
      - &ref_9
        id: SpeechmaticsRealtimeInitRequest
        contentType: application/json
        payload:
          - name: Init Request (Speechmatics)
            description: >-
              Initialize a 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.
                    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: punctuation_overrides
                    type: object
                    description: Punctuation settings.
                    required: false
                    properties:
                      - name: sensitivity
                        type: number
                        required: false
                      - name: permitted_marks
                        type: array
                        required: false
                        properties:
                          - name: item
                            type: string
                            required: false
                  - name: speaker_diarization_config
                    type: object
                    description: Speaker diarization settings.
                    required: false
                    properties:
                      - name: max_speakers
                        type: integer
                        required: false
                      - name: prefer_current_speaker
                        type: boolean
                        required: false
                      - name: speaker_sensitivity
                        type: number
                        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 a 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-2>
            config:
              type: object
              description: Speechmatics recognition configuration options.
              properties:
                language:
                  type: string
                  description: ISO language code for transcription.
                  default: en
                  x-parser-schema-id: <anonymous-schema-3>
                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-4>
                sample_rate:
                  type: integer
                  description: Audio sample rate in Hz.
                  default: 16000
                  x-parser-schema-id: <anonymous-schema-5>
                operating_point:
                  type: string
                  description: Quality level.
                  enum:
                    - standard
                    - enhanced
                  default: standard
                  x-parser-schema-id: <anonymous-schema-6>
                domain:
                  type: string
                  description: Specialized transcription domain.
                  x-parser-schema-id: <anonymous-schema-7>
                output_locale:
                  type: string
                  description: Locale for formatted output.
                  x-parser-schema-id: <anonymous-schema-8>
                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-10>
                  x-parser-schema-id: <anonymous-schema-9>
                diarization:
                  type: string
                  description: Diarization mode.
                  enum:
                    - none
                    - speaker
                    - channel
                    - channel_and_speaker
                  default: none
                  x-parser-schema-id: <anonymous-schema-11>
                max_delay:
                  type: number
                  description: Maximum final transcript delay in seconds.
                  minimum: 0.7
                  maximum: 4
                  default: 4
                  x-parser-schema-id: <anonymous-schema-12>
                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-13>
                enable_partials:
                  type: boolean
                  description: Enable partial transcript messages.
                  default: false
                  x-parser-schema-id: <anonymous-schema-14>
                enable_entities:
                  type: boolean
                  description: Enable entity detection.
                  default: false
                  x-parser-schema-id: <anonymous-schema-15>
                punctuation_overrides:
                  type: object
                  description: Punctuation settings.
                  properties:
                    sensitivity:
                      type: number
                      minimum: 0
                      maximum: 1
                      x-parser-schema-id: <anonymous-schema-17>
                    permitted_marks:
                      type: array
                      items:
                        type: string
                        x-parser-schema-id: <anonymous-schema-19>
                      x-parser-schema-id: <anonymous-schema-18>
                  x-parser-schema-id: <anonymous-schema-16>
                speaker_diarization_config:
                  type: object
                  description: Speaker diarization settings.
                  properties:
                    max_speakers:
                      type: integer
                      minimum: 2
                      x-parser-schema-id: <anonymous-schema-21>
                    prefer_current_speaker:
                      type: boolean
                      x-parser-schema-id: <anonymous-schema-22>
                    speaker_sensitivity:
                      type: number
                      minimum: 0
                      maximum: 1
                      x-parser-schema-id: <anonymous-schema-23>
                  x-parser-schema-id: <anonymous-schema-20>
                remove_disfluencies:
                  type: boolean
                  description: Remove disfluencies from transcripts.
                  default: false
                  x-parser-schema-id: <anonymous-schema-24>
                channel_diarization_labels:
                  type: array
                  description: Channel labels for channel diarization.
                  items:
                    type: string
                    x-parser-schema-id: <anonymous-schema-26>
                  x-parser-schema-id: <anonymous-schema-25>
                volume_threshold:
                  type: number
                  description: Lower volume limit for audio filtering.
                  minimum: 0
                  x-parser-schema-id: <anonymous-schema-27>
                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-28>
              x-parser-schema-id: SpeechmaticsRealtimeConfig
          x-parser-schema-id: <anonymous-schema-1>
        title: Init Request (Speechmatics)
        description: >-
          Initialize a Speechmatics Realtime session with recognition
          configuration.
        example: |-
          {
            "type": "init",
            "config": {
              "language": "en",
              "encoding": "pcm_s16le",
              "sample_rate": 16000,
              "operating_point": "enhanced",
              "enable_partials": true
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: SpeechmaticsRealtimeInitRequest
    bindings: []
    extensions: &ref_0
      - id: x-parser-unique-object-id
        value: /v1/stt/speechmatics/realtime:v2
  - &ref_2
    id: sttSpeechmaticsRealtimeV2ReceiveAudio
    title: Stt speechmatics realtime v2 receive audio
    description: Send audio frame to Speechmatics Realtime v2
    type: receive
    messages:
      - &ref_10
        id: SpeechmaticsRealtimeBinaryAudio
        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-29>
            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-29>
        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: SpeechmaticsRealtimeBinaryAudio
    bindings: []
    extensions: *ref_0
  - &ref_3
    id: sttSpeechmaticsRealtimeV2ReceiveFinalize
    title: Stt speechmatics realtime v2 receive finalize
    description: Force end of utterance on Speechmatics Realtime v2
    type: receive
    messages:
      - &ref_11
        id: SpeechmaticsRealtimeFinalize
        contentType: application/json
        payload:
          - name: Finalize Message
            description: Force the current utterance to end without closing the stream.
            type: object
            properties:
              - name: type
                type: string
                description: finalize
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          description: >-
            Force-finalize the current utterance and emit its final transcript.
            The connection remains open for further audio.
          required:
            - type
          properties:
            type:
              type: string
              const: finalize
              x-parser-schema-id: <anonymous-schema-31>
          x-parser-schema-id: <anonymous-schema-30>
        title: Finalize Message
        description: Force the current utterance to end without closing the stream.
        example: |-
          {
            "type": "finalize"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: SpeechmaticsRealtimeFinalize
    bindings: []
    extensions: *ref_0
  - &ref_4
    id: sttSpeechmaticsRealtimeV2ReceiveClose
    title: Stt speechmatics realtime v2 receive close
    description: Close audio stream on Speechmatics Realtime v2
    type: receive
    messages:
      - &ref_12
        id: SpeechmaticsRealtimeClose
        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 finalizes
            remaining audio, sends final results, then closes the connection.
          required:
            - type
          properties:
            type:
              type: string
              const: close
              x-parser-schema-id: <anonymous-schema-33>
          x-parser-schema-id: <anonymous-schema-32>
        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: SpeechmaticsRealtimeClose
    bindings: []
    extensions: *ref_0
  - &ref_5
    id: sttSpeechmaticsRealtimeV2SendPartialTranscript
    title: Stt speechmatics realtime v2 send partial transcript
    description: Receive partial transcript from Speechmatics Realtime v2
    type: send
    messages:
      - &ref_13
        id: SpeechmaticsRealtimePartialTranscript
        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-35>
            transcript:
              type: string
              description: Transcribed text so far.
              x-parser-schema-id: <anonymous-schema-36>
            start_time:
              type: number
              description: Start time of the segment in seconds.
              x-parser-schema-id: <anonymous-schema-37>
            end_time:
              type: number
              description: End time of the segment in seconds.
              x-parser-schema-id: <anonymous-schema-38>
            confidence:
              type: number
              description: Confidence score (0-1).
              x-parser-schema-id: <anonymous-schema-39>
            language:
              type: string
              description: Detected language of the segment.
              x-parser-schema-id: <anonymous-schema-40>
            speaker:
              type: string
              description: Speaker label, when diarization is enabled.
              x-parser-schema-id: <anonymous-schema-41>
            channel:
              type: string
              description: Channel label, when channel diarization is enabled.
              x-parser-schema-id: <anonymous-schema-42>
          x-parser-schema-id: <anonymous-schema-34>
        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: SpeechmaticsRealtimePartialTranscript
    bindings: []
    extensions: *ref_0
  - &ref_6
    id: sttSpeechmaticsRealtimeV2SendFinalTranscript
    title: Stt speechmatics realtime v2 send final transcript
    description: Receive final transcript from Speechmatics Realtime v2
    type: send
    messages:
      - &ref_14
        id: SpeechmaticsRealtimeFinalTranscript
        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-44>
            transcript:
              type: string
              description: Finalized transcribed text.
              x-parser-schema-id: <anonymous-schema-45>
            start_time:
              type: number
              description: Start time of the segment in seconds.
              x-parser-schema-id: <anonymous-schema-46>
            end_time:
              type: number
              description: End time of the segment in seconds.
              x-parser-schema-id: <anonymous-schema-47>
            confidence:
              type: number
              description: Confidence score (0-1).
              x-parser-schema-id: <anonymous-schema-48>
            language:
              type: string
              description: Detected language of the segment.
              x-parser-schema-id: <anonymous-schema-49>
            speaker:
              type: string
              description: Speaker label, when diarization is enabled.
              x-parser-schema-id: <anonymous-schema-50>
            channel:
              type: string
              description: Channel label, when channel diarization is enabled.
              x-parser-schema-id: <anonymous-schema-51>
          x-parser-schema-id: <anonymous-schema-43>
        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: SpeechmaticsRealtimeFinalTranscript
    bindings: []
    extensions: *ref_0
  - &ref_7
    id: sttSpeechmaticsRealtimeV2SendUtteranceEnd
    title: Stt speechmatics realtime v2 send utterance end
    description: Receive end-of-utterance from Speechmatics Realtime v2
    type: send
    messages:
      - &ref_15
        id: SpeechmaticsRealtimeUtteranceEnd
        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-53>
            last_word_end:
              type: number
              description: End time of the last word in the utterance, in seconds.
              x-parser-schema-id: <anonymous-schema-54>
            channel:
              type: string
              description: Channel label, when channel diarization is enabled.
              x-parser-schema-id: <anonymous-schema-55>
          x-parser-schema-id: <anonymous-schema-52>
        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: SpeechmaticsRealtimeUtteranceEnd
    bindings: []
    extensions: *ref_0
  - &ref_8
    id: sttSpeechmaticsRealtimeV2SendError
    title: Stt speechmatics realtime v2 send error
    description: Receive error from Speechmatics Realtime v2
    type: send
    messages:
      - &ref_16
        id: SpeechmaticsRealtimeError
        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-57>
            code:
              type: string
              description: Provider error type (e.g., invalid_audio_type, not_authorised).
              x-parser-schema-id: <anonymous-schema-58>
            message:
              type: string
              description: Human-readable error description.
              x-parser-schema-id: <anonymous-schema-59>
            status:
              type: integer
              description: Provider status code, when available.
              x-parser-schema-id: <anonymous-schema-60>
          x-parser-schema-id: <anonymous-schema-56>
        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: SpeechmaticsRealtimeError
    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/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: []

````