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

# Getting started with Bakbak Speech-to-Text (STT)

This guide will help you get up and running with the Bakbak STT API.

## Prerequisites

* An API key (contact your administrator)
* HTTP client (cURL, Postman, or your preferred tool)
* For WebSocket: a WebSocket client (e.g. `wscat`)

## Step 1: Transcribe via HTTPS (multipart)

Send a WAV file using `multipart/form-data`:

```bash
curl --location 'https://hub.getraya.app/transcribe' \
  -H 'X-API-Key: <YOUR_API_KEY>' \
  --form 'file=@"/path/to/audio.wav"' \
  --form 'language="hi"'
```

**Response:**

```json
{
  "transcript": "थैंक यू सर बस कुछ चीज़ें पूछनी थी ताकि हम कंसल्टेशन अच्छे से प्लान कर सकें आपके प्लॉट का एरिया रफली कितना होगा",
  "status": "success"
}
```

## Step 2: Transcribe via WebSocket (low latency)

1. Connect to the WebSocket endpoint:

```bash
wscat -c "wss://hub.getraya.app/transcribe" -H "X-API-Key: <YOUR_API_KEY>"
```

2. Send one JSON message per audio payload:

```json
{
  "audio_base64": "<BASE64_WAV_BYTES>",
  "language": "hi"
}
```

3. You will receive a JSON response like:

```json
{
  "transcript": "थैंक यू सर बस कुछ चीज़ें पूछनी थी ताकि हम कंसल्टेशन अच्छे से प्लान कर सकें आपके प्लॉट का एरिया रफली कितना होगा",
  "status": "success"
}
```

If you want to test WSS directly from docs UI, use the **API Reference → STT** AsyncAPI section.

## Next Steps

* Review the full [API Reference](https://docs.bakbak.si/api-reference/speech-to-text/transcribe)
* Try different `language` values from the [STT Overview](/speech-to-text/overview)