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

# Language selection

> Steer Sync STT transcription toward one or more languages with the language_code field.

Pass a `language_code` in the `config` part to steer transcription toward a specific language. For multilingual or code-switching audio, pass an array of codes instead of a single code.

* Accepts a single ISO 639-1 code (`"es"`) or a list of codes (`["en", "es"]`)
* Defaults to English (`en`) when omitted
* Ignored when a custom `prompt` is set — the prompt fully controls the model, so set the language inside the prompt if you also need custom instructions

<Tabs>
  <Tab title="Python" language="python">
    ```python theme={null}
    import json
    import requests

    with open("sample.wav", "rb") as f:
        audio = f.read()

    response = requests.post(
        "https://sync.assemblyai.com/transcribe",
        headers={
            "Authorization": "<YOUR_API_KEY>",
            "X-AAI-Model": "universal-3-5-pro",
        },
        files={
            "audio": ("sample.wav", audio, "audio/wav"),
            "config": (None, json.dumps({"language_code": "es"}), "application/json"),
        },
        timeout=60,
    )
    response.raise_for_status()
    print(response.json()["text"])
    ```
  </Tab>

  <Tab title="JavaScript" language="javascript">
    ```javascript theme={null}
    import { readFileSync } from "fs";

    const audio = readFileSync("sample.wav");
    const form = new FormData();
    form.append("audio", new Blob([audio], { type: "audio/wav" }), "sample.wav");
    form.append(
      "config",
      new Blob([JSON.stringify({ language_code: "es" })], {
        type: "application/json",
      })
    );

    const response = await fetch("https://sync.assemblyai.com/transcribe", {
      method: "POST",
      headers: {
        Authorization: "<YOUR_API_KEY>",
        "X-AAI-Model": "universal-3-5-pro",
      },
      body: form,
    });

    const result = await response.json();
    console.log(result.text);
    ```
  </Tab>

  <Tab title="cURL" language="bash">
    ```bash theme={null}
    curl -X POST https://sync.assemblyai.com/transcribe \
      -H 'Authorization: <YOUR_API_KEY>' \
      -H 'X-AAI-Model: universal-3-5-pro' \
      -F 'audio=@sample.wav;type=audio/wav' \
      -F 'config={"language_code":"es"};type=application/json'
    ```
  </Tab>
</Tabs>

For multilingual or code-switching audio, pass `language_code` as an array listing every expected language:

```json theme={null}
{ "language_code": ["en", "es"] }
```

## Supported languages

| Code | Language   | Code | Language   |
| ---- | ---------- | ---- | ---------- |
| `en` | English    | `da` | Danish     |
| `es` | Spanish    | `fi` | Finnish    |
| `de` | German     | `hi` | Hindi      |
| `fr` | French     | `vi` | Vietnamese |
| `it` | Italian    | `ar` | Arabic     |
| `pt` | Portuguese | `he` | Hebrew     |
| `tr` | Turkish    | `ja` | Japanese   |
| `nl` | Dutch      | `ur` | Urdu       |
| `sv` | Swedish    | `zh` | Mandarin   |
| `no` | Norwegian  |      |            |
