> ## Documentation Index
> Fetch the complete documentation index at: https://docs.somya.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Speech to Text (Vyasa)

> Accent- and noise-robust automatic speech recognition.

**Vyasa** is SomyaLabs' automatic speech recognition (ASR) *model*, built for
Indian languages, accents, and real-world audio. Transcribe audio with
`POST /v1/speech/transcriptions`.

## Request

Send the audio as `multipart/form-data` under the `audio` field:

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.somya.ai/v1/speech/transcriptions \
    -H "X-API-Key: YOUR_API_KEY" \
    -F "audio=@recording.wav"
  ```

  ```python Python theme={null}
  import requests

  with open("recording.wav", "rb") as f:
      resp = requests.post(
          "https://api.somya.ai/v1/speech/transcriptions",
          headers={"X-API-Key": "YOUR_API_KEY"},
          files={"audio": ("recording.wav", f, "audio/wav")},
      )
  print(resp.json()["data"]["text"])
  ```

  ```typescript TypeScript theme={null}
  const form = new FormData();
  form.append("audio", audioBlob, "recording.wav");

  const resp = await fetch("https://api.somya.ai/v1/speech/transcriptions", {
    method: "POST",
    headers: { "X-API-Key": "YOUR_API_KEY" },
    body: form,
  });
  const { data } = await resp.json();
  console.log(data.text);
  ```
</CodeGroup>

## Response

The standard envelope, with the transcript under `data.text`:

```json theme={null}
{
  "success": true,
  "data": { "text": "namaste aapka swaagat hai" }
}
```

## Audio formats & limits

The endpoint accepts common audio container/codecs (e.g. WAV, MP3, WebM/Opus,
M4A). Oversized or unsupported uploads are rejected:

* **`413`** — the audio file is too large.
* **`415`** — the audio format isn't supported.

<Note>
  Exact maximum file size and the full list of accepted formats depend on the
  deployment. If you hit `413`/`415`, downsample/convert to 16 kHz mono WAV — the
  most broadly supported input — or check the
  [API Reference](/api-reference/introduction). See [Errors](/guides/errors) for
  handling.
</Note>
