> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.bakbak.si/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.bakbak.si/_mcp/server.

# WebSocket

GET /transcribe

Use this endpoint for low-latency transcription over WebSocket.

- **Connection URL:** `wss://hub.getraya.app/transcribe`
- **Authentication:** Send `X-API-Key` in headers during WebSocket connect.
- **Client flow:** connect, send `transcribeRequest`, receive `transcribeResponse` or `errorResponse`.

- **You send:** Client sends a JSON payload containing base64 WAV audio.
- **You receive:** Server returns a transcript or an error payload.

Reference: https://docs.bakbak.si/api-reference/speech-to-text/websocket

## AsyncAPI Specification

```yaml
asyncapi: 2.6.0
info:
  title: transcribe
  version: subpackage_transcribe.transcribe
  description: >-
    Use this endpoint for low-latency transcription over WebSocket.


    - **Connection URL:** `wss://hub.getraya.app/transcribe`

    - **Authentication:** Send `X-API-Key` in headers during WebSocket connect.

    - **Client flow:** connect, send `transcribeRequest`, receive
    `transcribeResponse` or `errorResponse`.


    - **You send:** Client sends a JSON payload containing base64 WAV audio.

    - **You receive:** Server returns a transcript or an error payload.
channels:
  /transcribe:
    description: >-
      Use this endpoint for low-latency transcription over WebSocket.


      - **Connection URL:** `wss://hub.getraya.app/transcribe`

      - **Authentication:** Send `X-API-Key` in headers during WebSocket
      connect.

      - **Client flow:** connect, send `transcribeRequest`, receive
      `transcribeResponse` or `errorResponse`.


      - **You send:** Client sends a JSON payload containing base64 WAV audio.

      - **You receive:** Server returns a transcript or an error payload.
    publish:
      operationId: subpackage_transcribe.transcribe-publish
      summary: Server messages
      message:
        oneOf:
          - $ref: >-
              #/components/messages/subpackage_transcribe.transcribe-server-0-transcribeResponse
          - $ref: >-
              #/components/messages/subpackage_transcribe.transcribe-server-1-errorResponse
    subscribe:
      operationId: subpackage_transcribe.transcribe-subscribe
      summary: transcribeRequest
      description: Send one JSON message per audio payload.
      message:
        name: transcribeRequest
        title: transcribeRequest
        description: Send one JSON message per audio payload.
        payload:
          $ref: '#/components/schemas/transcribe_transcribeRequest'
servers:
  Production server:
    url: wss://hub.getraya.app/
    protocol: wss
components:
  messages:
    subpackage_transcribe.transcribe-server-0-transcribeResponse:
      name: transcribeResponse
      title: transcribeResponse
      description: Successful transcription response.
      payload:
        $ref: '#/components/schemas/transcribe_transcribeResponse'
    subpackage_transcribe.transcribe-server-1-errorResponse:
      name: errorResponse
      title: errorResponse
      description: Error payload when transcription fails.
      payload:
        $ref: '#/components/schemas/transcribe_errorResponse'
  schemas:
    ChannelsTranscribeMessagesTranscribeResponseStatus:
      type: string
      enum:
        - success
        - error
      title: ChannelsTranscribeMessagesTranscribeResponseStatus
    transcribe_transcribeResponse:
      type: object
      properties:
        transcript:
          type: string
          description: Transcribed text.
        status:
          $ref: >-
            #/components/schemas/ChannelsTranscribeMessagesTranscribeResponseStatus
      required:
        - transcript
        - status
      title: transcribe_transcribeResponse
    transcribe_errorResponse:
      type: object
      properties:
        detail:
          type: string
          description: Error message describing what went wrong.
      title: transcribe_errorResponse
    LanguageCode:
      type: string
      enum:
        - as
        - bn
        - brx
        - doi
        - en
        - gu
        - hi
        - kn
        - kok
        - ks
        - mai
        - ml
        - mni
        - mr
        - ne
        - or
        - pa
        - sa
        - sat
        - sd
        - ta
        - te
        - ur
      title: LanguageCode
    transcribe_transcribeRequest:
      type: object
      properties:
        audio_base64:
          type: string
          description: Base64-encoded WAV audio bytes.
        language:
          $ref: '#/components/schemas/LanguageCode'
      required:
        - audio_base64
      title: transcribe_transcribeRequest

```