asyncapi: 3.0.0
info:
  title: SLNG Gateway API - Deepgram STT
  version: 0.1.0
  description: SLNG Gateway API
  contact:
    name: SLNG Support
    url: https://slng.ai
    email: support@slng.ai
  license:
    name: Proprietary
  tags:
    - name: STT
      description: Speech-to-Text services
    - name: Unmute STT Bridge
      description: SLNG native WebSocket STT protocol bridge.
    - name: Unmute TTS Bridge
      description: SLNG native WebSocket TTS protocol bridge.
servers:
  production:
    host: api.slng.ai
    protocol: wss
    description: Production
    security:
      - $ref: "#/components/securitySchemes/bearer"
  staging:
    host: stageapi.slng.ai
    protocol: wss
    description: Staging
    security:
      - $ref: "#/components/securitySchemes/bearer"
channels:
  /v1/stt/deepgram/nova:2:
    address: /v1/stt/deepgram/nova:2
    title: Nova 2
    summary: Nova 2
    description: Stream real-time speech-to-text transcripts from Deepgram Nova 2 over WebSocket with voice activity detection, speaker diarization, and partial results.
    tags:
      - name: Deepgram Nova 2
    servers:
      - $ref: "#/servers/production"
      - $ref: "#/servers/staging"
    messages:
      DeepgramSttInitRequest:
        $ref: "#/components/messages/DeepgramSttInitRequest"
      DeepgramSttBinaryAudio:
        $ref: "#/components/messages/DeepgramSttBinaryAudio"
      SttFinalizeMessage:
        $ref: "#/components/messages/SttFinalizeMessage"
      SttCloseMessage:
        $ref: "#/components/messages/SttCloseMessage"
      KeepaliveMessage:
        $ref: "#/components/messages/KeepaliveMessage"
      DeepgramSttMetadata:
        $ref: "#/components/messages/DeepgramSttMetadata"
      DeepgramSttResultsEn:
        $ref: "#/components/messages/DeepgramSttResultsEn"
      DeepgramSttError:
        $ref: "#/components/messages/DeepgramSttError"
    bindings:
      ws:
        method: GET
        headers:
          $ref: "#/components/schemas/WebsocketHeadersDeepgramNova2"
  /v1/stt/deepgram/nova:3:
    address: /v1/stt/deepgram/nova:3
    title: Nova 3
    summary: Nova 3
    description: Stream real-time speech-to-text transcripts from Deepgram Nova 3 over WebSocket with voice activity detection, speaker diarization, and partial results.
    tags:
      - name: Deepgram Nova 3
    servers:
      - $ref: "#/servers/production"
      - $ref: "#/servers/staging"
    messages:
      DeepgramSttInitRequest:
        $ref: "#/components/messages/DeepgramSttInitRequest"
      DeepgramSttBinaryAudio:
        $ref: "#/components/messages/DeepgramSttBinaryAudio"
      SttFinalizeMessage:
        $ref: "#/components/messages/SttFinalizeMessage"
      SttCloseMessage:
        $ref: "#/components/messages/SttCloseMessage"
      KeepaliveMessage:
        $ref: "#/components/messages/KeepaliveMessage"
      DeepgramSttMetadata:
        $ref: "#/components/messages/DeepgramSttMetadata"
      DeepgramSttResultsEn:
        $ref: "#/components/messages/DeepgramSttResultsEn"
      DeepgramSttError:
        $ref: "#/components/messages/DeepgramSttError"
    bindings:
      ws:
        method: GET
        headers:
          $ref: "#/components/schemas/WebsocketHeadersDeepgramNova3"
  /v1/stt/deepgram/nova:3-medical:
    address: /v1/stt/deepgram/nova:3-medical
    title: Nova 3 Medical
    summary: Nova 3 Medical
    description: Stream real-time medical transcription from Deepgram Nova 3 Medical over WebSocket with healthcare-specific vocabulary, VAD, and speaker diarization.
    tags:
      - name: Deepgram Nova 3 Medical
    servers:
      - $ref: "#/servers/production"
      - $ref: "#/servers/staging"
    messages:
      DeepgramSttInitRequest:
        $ref: "#/components/messages/DeepgramSttInitRequest"
      DeepgramSttBinaryAudio:
        $ref: "#/components/messages/DeepgramSttBinaryAudio"
      SttFinalizeMessage:
        $ref: "#/components/messages/SttFinalizeMessage"
      SttCloseMessage:
        $ref: "#/components/messages/SttCloseMessage"
      KeepaliveMessage:
        $ref: "#/components/messages/KeepaliveMessage"
      DeepgramSttMetadata:
        $ref: "#/components/messages/DeepgramSttMetadata"
      DeepgramSttResultsEn:
        $ref: "#/components/messages/DeepgramSttResultsEn"
      DeepgramSttError:
        $ref: "#/components/messages/DeepgramSttError"
    bindings:
      ws:
        method: GET
        headers:
          $ref: "#/components/schemas/WebsocketHeadersDeepgramNova3Medical"
operations:
  sttDeepgramNova2ReceiveInit:
    action: receive
    channel:
      $ref: "#/channels/~1v1~1stt~1deepgram~1nova:2"
    summary: Initialize session on Nova 2
    messages:
      - $ref: "#/channels/~1v1~1stt~1deepgram~1nova:2/messages/DeepgramSttInitRequest"
    description: Initialize session on Nova 2
    tags: []
  sttDeepgramNova2ReceiveAudio:
    action: receive
    channel:
      $ref: "#/channels/~1v1~1stt~1deepgram~1nova:2"
    summary: Send audio frame to Nova 2
    messages:
      - $ref: "#/channels/~1v1~1stt~1deepgram~1nova:2/messages/DeepgramSttBinaryAudio"
    description: Send audio frame to Nova 2
    tags: []
  sttDeepgramNova2ReceiveFinalize:
    action: receive
    channel:
      $ref: "#/channels/~1v1~1stt~1deepgram~1nova:2"
    summary: Force-finalize buffered audio on Nova 2
    messages:
      - $ref: "#/channels/~1v1~1stt~1deepgram~1nova:2/messages/SttFinalizeMessage"
    description: Force-finalize buffered audio on Nova 2
    tags: []
  sttDeepgramNova2ReceiveClose:
    action: receive
    channel:
      $ref: "#/channels/~1v1~1stt~1deepgram~1nova:2"
    summary: Close audio stream on Nova 2
    messages:
      - $ref: "#/channels/~1v1~1stt~1deepgram~1nova:2/messages/SttCloseMessage"
    description: Close audio stream on Nova 2
    tags: []
  sttDeepgramNova2ReceiveKeepalive:
    action: receive
    channel:
      $ref: "#/channels/~1v1~1stt~1deepgram~1nova:2"
    summary: Send keepalive on Nova 2
    messages:
      - $ref: "#/channels/~1v1~1stt~1deepgram~1nova:2/messages/KeepaliveMessage"
    description: Send keepalive on Nova 2
    tags: []
  sttDeepgramNova2SendMetadata:
    action: send
    channel:
      $ref: "#/channels/~1v1~1stt~1deepgram~1nova:2"
    summary: Receive Deepgram session metadata from Nova 2
    messages:
      - $ref: "#/channels/~1v1~1stt~1deepgram~1nova:2/messages/DeepgramSttMetadata"
    description: |
      Receive Deepgram Metadata message. Sent when the backend connects and again after the session ends. Informational — do not wait for it before streaming audio.
    tags: []
  sttDeepgramNova2SendResults:
    action: send
    channel:
      $ref: "#/channels/~1v1~1stt~1deepgram~1nova:2"
    summary: Receive transcription results from Deepgram Nova 2
    messages:
      - $ref: "#/channels/~1v1~1stt~1deepgram~1nova:2/messages/DeepgramSttResultsEn"
    description: |
      Receive Deepgram Results message. Use is_final to distinguish partial (interim) from final transcripts, and speech_final for end-of-utterance.
    tags: []
  sttDeepgramNova2SendError:
    action: send
    channel:
      $ref: "#/channels/~1v1~1stt~1deepgram~1nova:2"
    summary: Receive error from Nova 2
    messages:
      - $ref: "#/channels/~1v1~1stt~1deepgram~1nova:2/messages/DeepgramSttError"
    description: Receive error from Nova 2
    tags: []
  sttDeepgramNova3ReceiveInit:
    action: receive
    channel:
      $ref: "#/channels/~1v1~1stt~1deepgram~1nova:3"
    summary: Initialize session on Nova 3
    messages:
      - $ref: "#/channels/~1v1~1stt~1deepgram~1nova:3/messages/DeepgramSttInitRequest"
    description: Initialize session on Nova 3
    tags: []
  sttDeepgramNova3ReceiveAudio:
    action: receive
    channel:
      $ref: "#/channels/~1v1~1stt~1deepgram~1nova:3"
    summary: Send audio frame to Nova 3
    messages:
      - $ref: "#/channels/~1v1~1stt~1deepgram~1nova:3/messages/DeepgramSttBinaryAudio"
    description: Send audio frame to Nova 3
    tags: []
  sttDeepgramNova3ReceiveFinalize:
    action: receive
    channel:
      $ref: "#/channels/~1v1~1stt~1deepgram~1nova:3"
    summary: Force-finalize buffered audio on Nova 3
    messages:
      - $ref: "#/channels/~1v1~1stt~1deepgram~1nova:3/messages/SttFinalizeMessage"
    description: Force-finalize buffered audio on Nova 3
    tags: []
  sttDeepgramNova3ReceiveClose:
    action: receive
    channel:
      $ref: "#/channels/~1v1~1stt~1deepgram~1nova:3"
    summary: Close audio stream on Nova 3
    messages:
      - $ref: "#/channels/~1v1~1stt~1deepgram~1nova:3/messages/SttCloseMessage"
    description: Close audio stream on Nova 3
    tags: []
  sttDeepgramNova3ReceiveKeepalive:
    action: receive
    channel:
      $ref: "#/channels/~1v1~1stt~1deepgram~1nova:3"
    summary: Send keepalive on Nova 3
    messages:
      - $ref: "#/channels/~1v1~1stt~1deepgram~1nova:3/messages/KeepaliveMessage"
    description: Send keepalive on Nova 3
    tags: []
  sttDeepgramNova3SendMetadata:
    action: send
    channel:
      $ref: "#/channels/~1v1~1stt~1deepgram~1nova:3"
    summary: Receive Deepgram session metadata from Nova 3
    messages:
      - $ref: "#/channels/~1v1~1stt~1deepgram~1nova:3/messages/DeepgramSttMetadata"
    description: |
      Receive Deepgram Metadata message. Sent when the backend connects and again after the session ends. Informational — do not wait for it before streaming audio.
    tags: []
  sttDeepgramNova3SendResults:
    action: send
    channel:
      $ref: "#/channels/~1v1~1stt~1deepgram~1nova:3"
    summary: Receive transcription results from Deepgram Nova 3
    messages:
      - $ref: "#/channels/~1v1~1stt~1deepgram~1nova:3/messages/DeepgramSttResultsEn"
    description: |
      Receive Deepgram Results message. Use is_final to distinguish partial (interim) from final transcripts, and speech_final for end-of-utterance.
    tags: []
  sttDeepgramNova3SendError:
    action: send
    channel:
      $ref: "#/channels/~1v1~1stt~1deepgram~1nova:3"
    summary: Receive error from Nova 3
    messages:
      - $ref: "#/channels/~1v1~1stt~1deepgram~1nova:3/messages/DeepgramSttError"
    description: Receive error from Nova 3
    tags: []
  sttDeepgramNova3MedicalReceiveInit:
    action: receive
    channel:
      $ref: "#/channels/~1v1~1stt~1deepgram~1nova:3-medical"
    summary: Initialize session on Nova 3 Medical
    messages:
      - $ref: "#/channels/~1v1~1stt~1deepgram~1nova:3-medical/messages/DeepgramSttInitRequest"
    description: Initialize session on Nova 3 Medical
    tags: []
  sttDeepgramNova3MedicalReceiveAudio:
    action: receive
    channel:
      $ref: "#/channels/~1v1~1stt~1deepgram~1nova:3-medical"
    summary: Send audio frame to Nova 3 Medical
    messages:
      - $ref: "#/channels/~1v1~1stt~1deepgram~1nova:3-medical/messages/DeepgramSttBinaryAudio"
    description: Send audio frame to Nova 3 Medical
    tags: []
  sttDeepgramNova3MedicalReceiveFinalize:
    action: receive
    channel:
      $ref: "#/channels/~1v1~1stt~1deepgram~1nova:3-medical"
    summary: Force-finalize buffered audio on Nova 3 Medical
    messages:
      - $ref: "#/channels/~1v1~1stt~1deepgram~1nova:3-medical/messages/SttFinalizeMessage"
    description: Force-finalize buffered audio on Nova 3 Medical
    tags: []
  sttDeepgramNova3MedicalReceiveClose:
    action: receive
    channel:
      $ref: "#/channels/~1v1~1stt~1deepgram~1nova:3-medical"
    summary: Close audio stream on Nova 3 Medical
    messages:
      - $ref: "#/channels/~1v1~1stt~1deepgram~1nova:3-medical/messages/SttCloseMessage"
    description: Close audio stream on Nova 3 Medical
    tags: []
  sttDeepgramNova3MedicalReceiveKeepalive:
    action: receive
    channel:
      $ref: "#/channels/~1v1~1stt~1deepgram~1nova:3-medical"
    summary: Send keepalive on Nova 3 Medical
    messages:
      - $ref: "#/channels/~1v1~1stt~1deepgram~1nova:3-medical/messages/KeepaliveMessage"
    description: Send keepalive on Nova 3 Medical
    tags: []
  sttDeepgramNova3MedicalSendMetadata:
    action: send
    channel:
      $ref: "#/channels/~1v1~1stt~1deepgram~1nova:3-medical"
    summary: Receive Deepgram session metadata from Nova 3 Medical
    messages:
      - $ref: "#/channels/~1v1~1stt~1deepgram~1nova:3-medical/messages/DeepgramSttMetadata"
    description: |
      Receive Deepgram Metadata message. Sent when the backend connects and again after the session ends. Informational — do not wait for it before streaming audio.
    tags: []
  sttDeepgramNova3MedicalSendResults:
    action: send
    channel:
      $ref: "#/channels/~1v1~1stt~1deepgram~1nova:3-medical"
    summary: Receive transcription results from Deepgram Nova 3 Medical
    messages:
      - $ref: "#/channels/~1v1~1stt~1deepgram~1nova:3-medical/messages/DeepgramSttResultsEn"
    description: |
      Receive Deepgram Results message. Use is_final to distinguish partial (interim) from final transcripts, and speech_final for end-of-utterance.
    tags: []
  sttDeepgramNova3MedicalSendError:
    action: send
    channel:
      $ref: "#/channels/~1v1~1stt~1deepgram~1nova:3-medical"
    summary: Receive error from Nova 3 Medical
    messages:
      - $ref: "#/channels/~1v1~1stt~1deepgram~1nova:3-medical/messages/DeepgramSttError"
    description: Receive error from Nova 3 Medical
    tags: []
components:
  schemas:
    WebsocketHeadersDeepgramNova2:
      type: object
      properties:
        X-World-Part-Override:
          type: string
          description: "Target world part override. Auto-selected if not provided. Available world parts: `na`, `eu`."
          enum:
            - na
            - eu
    WebsocketHeadersDeepgramNova3:
      type: object
      properties:
        X-World-Part-Override:
          type: string
          description: "Target world part override. Auto-selected if not provided. Available world parts: `na`, `eu`."
          enum:
            - na
            - eu
    WebsocketHeadersDeepgramNova3Medical:
      type: object
      properties:
        X-World-Part-Override:
          type: string
          description: "Target world part override. Auto-selected if not provided. Available world parts: `na`, `eu`."
          enum:
            - na
            - eu
    DeepgramSttResultsPayload:
      type: object
      description: |
        Deepgram native Results message. Contains the transcription in channel.alternatives[0].transcript. Use is_final to distinguish partial (interim) from final results, and speech_final to detect end-of-utterance boundaries.
      required:
        - type
        - channel
      properties:
        type:
          type: string
          const: Results
        is_final:
          type: boolean
          description: true for final results, false for interim/partial
        speech_final:
          type: boolean
          description: true when endpoint detection fires (end of utterance)
        channel_index:
          type: array
          items:
            type: integer
          description: Channel index pair [channel, total_channels]
        channel:
          type: object
          description: Deepgram channel result with transcription alternatives
          properties:
            alternatives:
              type: array
              items:
                type: object
                properties:
                  transcript:
                    type: string
                    description: Transcribed text
                  confidence:
                    type: number
                    description: Confidence score (0-1)
                  words:
                    type: array
                    description: Word-level transcription details
                    items:
                      type: object
                      properties:
                        word:
                          type: string
                        start:
                          type: number
                          description: Word start time in seconds
                        end:
                          type: number
                          description: Word end time in seconds
                        confidence:
                          type: number
                        speaker:
                          type: integer
                          description: Speaker ID (when diarization enabled)
                        punctuated_word:
                          type: string
        start:
          type: number
          description: Start time of this segment in seconds
        duration:
          type: number
          description: Duration of this segment in seconds
  messages:
    DeepgramSttError:
      name: DeepgramSttError
      title: Error
      summary: Error from the Deepgram backend or gateway.
      contentType: application/json
      payload:
        type: object
        description: |
          Error message. May originate from the gateway (with code field) or from Deepgram directly (with variant and description fields).
        required:
          - type
        properties:
          type:
            type: string
            const: Error
          code:
            type: string
            description: Gateway error code (e.g., backend_connection_failed, stt_metering_unavailable)
          message:
            type: string
            description: Human-readable error description (gateway errors)
          variant:
            type: string
            description: Deepgram error variant (e.g., SchemaError)
          description:
            type: string
            description: Deepgram error description
      examples:
        - name: deepgramBackendError
          summary: Backend connection failure
          payload:
            type: Error
            code: backend_connection_failed
            message: "Failed to connect to backend: 500 Internal Server Error"
        - name: deepgramSchemaError
          summary: Invalid message schema
          payload:
            type: Error
            variant: SchemaError
            description: "Could not deserialize last text message: unknown variant"
    DeepgramSttResultsEn:
      name: DeepgramSttResultsEn
      title: Results
      summary: Deepgram transcription result — partial or final, determined by is_final.
      contentType: application/json
      payload:
        $ref: "#/components/schemas/DeepgramSttResultsPayload"
      examples:
        - name: deepgramResultsFinalEn
          summary: Final transcription result
          payload:
            type: Results
            channel_index:
              - 0
              - 1
            duration: 3.52
            start: 0
            is_final: true
            speech_final: true
            channel:
              alternatives:
                - transcript: The quick brown fox jumps over the lazy dog.
                  confidence: 0.9980469
                  words:
                    - word: the
                      start: 0.08
                      end: 0.16
                      confidence: 0.9975586
                      punctuated_word: The
                    - word: quick
                      start: 0.16
                      end: 0.4
                      confidence: 0.9951172
                      punctuated_word: quick
                    - word: brown
                      start: 0.4
                      end: 0.64
                      confidence: 0.9980469
                      punctuated_word: brown
    DeepgramSttMetadata:
      name: DeepgramSttMetadata
      title: Metadata
      summary: |
        Deepgram session metadata. Sent when the backend connects and again after the session ends with final statistics. This is informational — do not wait for it before streaming audio.
      contentType: application/json
      payload:
        type: object
        description: |
          Deepgram native Metadata message. Received twice: once when the session opens (duration=0) and once after finalize with the full session summary.
        required:
          - type
        properties:
          type:
            type: string
            const: Metadata
          request_id:
            type: string
            description: Unique Deepgram request identifier
          created:
            type: string
            format: date-time
            description: Timestamp when the session was created
          duration:
            type: number
            description: Total audio duration processed in seconds (0 on initial, populated on final)
          channels:
            type: integer
            description: Number of audio channels
          sha256:
            type: string
            description: SHA-256 hash of the audio (populated on final Metadata only)
          transaction_key:
            type: string
            description: Deprecated field (always "deprecated")
      examples:
        - name: deepgramMetadataOpen
          summary: Session opened (initial Metadata)
          payload:
            type: Metadata
            request_id: a2b1db35-40ff-41f9-9912-dedaeab02228
            created: 2026-04-01T09:40:09.152Z
            duration: 0
            channels: 1
            sha256: incomplete
            transaction_key: deprecated
        - name: deepgramMetadataFinal
          summary: Session complete (final Metadata)
          payload:
            type: Metadata
            request_id: a2b1db35-40ff-41f9-9912-dedaeab02228
            created: 2026-04-01T09:40:09.152Z
            duration: 19.78
            channels: 1
            sha256: 34f3ece92c8345e1fbcb497f5189a3b1448457e6ab18d93d6234308580a3fd81
            transaction_key: deprecated
    KeepaliveMessage:
      name: KeepaliveMessage
      title: Keepalive Message
      summary: Keep the WebSocket connection alive during silence.
      contentType: application/json
      payload:
        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
      examples:
        - name: keepalive
          summary: Send keepalive
          payload:
            type: keepalive
    SttCloseMessage:
      name: SttCloseMessage
      title: Close Message
      summary: Signal end of audio stream and close the connection.
      contentType: application/json
      payload:
        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
      examples:
        - name: close
          summary: Close the audio stream
          payload:
            type: close
    SttFinalizeMessage:
      name: SttFinalizeMessage
      title: Finalize Message
      summary: Force-finalize buffered audio tokens without closing the connection.
      contentType: application/json
      payload:
        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
      examples:
        - name: finalize
          summary: Force-finalize buffered audio
          payload:
            type: finalize
    DeepgramSttBinaryAudio:
      name: DeepgramSttBinaryAudio
      title: Binary Audio Frame
      summary: |
        Stream raw binary PCM audio frames to be transcribed. Sent as binary WebSocket frames (NOT JSON). Recommended chunk size is 8192 bytes (~256ms at 16kHz linear16). Start streaming immediately after the init message — do not wait for the Metadata response.
      contentType: application/octet-stream
      payload:
        type: string
        format: binary
        description: |
          Raw binary audio data (linear16 PCM at 16kHz mono). Sent as a binary WebSocket frame — no JSON envelope, no base64 encoding. Each frame is a chunk of raw PCM samples. Example hex dump of one frame (speech waveform): 0000FF00000000FF00000000010101010101010100000000FFFFFFFEFE FEFEFDFEFEFEFEFDFDFEFEFEFEFEFEFEFEFEFFFFFFFFFEFEFEFEFF000100 001020303030303030303030201010000FFFFFEFDFDFDFDFEFFFFFFFF00 Each pair of hex digits is one byte. At 16kHz linear16, 8192 bytes = 4096 samples = ~256ms of audio.
      examples:
        - name: binaryAudioFrame
          summary: Raw PCM audio frame (~256ms of 16kHz linear16 speech)
          payload: 0000FF00000000FF00000000010101010101010100000000FFFFFFFFFFFFFEFEFDFEFEFEFEFDFDFEFEFEFEFEFEFEFEFEFFFFFFFFFEFEFEFEFF000100001020303030303030303030201010000FFFFFEFDFDFDFDFEFFFFFFFF0001020303020201000000FFFDFCFBFAFAFBFAF9F8F7F7F7F6F6F4F2F2F3F7FC000406090F14191A19181715110E0A05FEF9F6F3F0EEECEBEBECEEF2F6F9FC0005090D0F101010100E0C080401
    DeepgramSttInitRequest:
      name: DeepgramSttInitRequest
      title: Init Request
      summary: Initialize a Deepgram STT session with provider-specific recognition configuration.
      contentType: application/json
      payload:
        type: object
        description: Initialize a Deepgram Nova STT session with full provider-specific configuration options before streaming audio.
        required:
          - type
        properties:
          type:
            type: string
            const: init
          config:
            type: object
            description: Deepgram recognition configuration options
            properties:
              language:
                type: string
                description: Supported language code for transcription.
                default: en
                enum:
                  - multi
                  - en
                  - en-us
                  - en-au
                  - en-gb
                  - en-nz
                  - en-in
                  - en-ca
                  - es
                  - fr
                  - de
                  - it
                  - pt
                  - nl
                  - hi
                  - ja
                  - ru
              sample_rate:
                type: integer
                description: Input audio sample rate in Hz.
                default: 16000
              encoding:
                type: string
                description: Input audio encoding format.
                default: linear16
                enum:
                  - linear16
                  - flac
                  - mulaw
                  - amr-nb
                  - amr-wb
                  - opus
                  - speex
                  - mp3
                  - mp4
                  - webm
                  - aac
                  - ogg
              enable_partials:
                type: boolean
                description: Enable partial/interim transcription results.
                default: true
              punctuate:
                type: boolean
                description: Add punctuation and capitalization.
                default: false
              smart_format:
                type: boolean
                description: Apply formatting to improve readability (dates, times, numbers, etc.).
                default: false
              diarize:
                type: boolean
                description: Enable speaker diarization. Words assigned speaker numbers starting at 0.
                default: false
              numerals:
                type: boolean
                description: Convert spoken numbers to digits.
                default: false
              profanity_filter:
                type: boolean
                description: Filter profanity from transcript.
                default: false
              endpointing:
                type: integer
                minimum: 0
                default: 10
                description: Time in milliseconds of silence before finalizing speech. Set to 0 to disable endpointing entirely.
              utterance_end_ms:
                type: integer
                minimum: 200
                maximum: 5000
                default: 1000
                description: Time in milliseconds of silence between words before sending an UtteranceEnd message. Default is 1000ms, minimum 200ms, maximum 5000ms. Requires enable_partials to be true.
      examples:
        - name: deepgramInitEn
          summary: English transcription with smart formatting
          payload:
            type: init
            config:
              language: en
              sample_rate: 16000
              encoding: linear16
              enable_partials: true
              punctuate: true
              smart_format: true
        - name: deepgramInitHi
          summary: Hindi transcription
          payload:
            type: init
            config:
              language: hi
              sample_rate: 16000
              encoding: linear16
              enable_partials: true
              smart_format: true
        - name: deepgramInitEs
          summary: Spanish transcription with diarization
          payload:
            type: init
            config:
              language: es
              sample_rate: 16000
              encoding: linear16
              enable_partials: true
              smart_format: true
              diarize: true
        - name: deepgramInitWithEndpointing
          summary: English with endpointing and utterance end detection
          payload:
            type: init
            config:
              language: en
              sample_rate: 16000
              encoding: linear16
              enable_partials: true
              endpointing: 300
              utterance_end_ms: 1000
        - name: deepgramInitMulti
          summary: Multi-language auto-detection
          payload:
            type: init
            config:
              language: multi
              sample_rate: 16000
              encoding: linear16
              enable_partials: true
              smart_format: true
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: |
        API key issued by SLNG. Pass as `Authorization: Bearer <token>` in the WebSocket upgrade request headers.
