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

# STT Options

> Configure transcription

```ts theme={null}
const transcription = await RunAnywhere.stt.transcribe(audio, {
  language: 'en',
  punctuation: true,
  wordTimestamps: true,
  diarization: false,
  translateToEnglish: false,
})
```

## Fields

| Field                | Type      | Default           | Meaning                          |
| -------------------- | --------- | ----------------- | -------------------------------- |
| `language`           | `string`  | none, auto-detect | BCP-47 code such as `'en'`       |
| `punctuation`        | `boolean` | proto default     | Insert punctuation and casing    |
| `wordTimestamps`     | `boolean` | proto default     | Per-word timings                 |
| `diarization`        | `boolean` | `false`           | Attribute speech to speakers     |
| `maxSpeakers`        | `number`  | none              | Cap the speaker count            |
| `translateToEnglish` | `boolean` | `false`           | Translate rather than transcribe |

## Language

Leave `language` unset to auto-detect. Set it when you know the language: detection costs time
and picks wrong on short clips.

## Word timestamps

```ts theme={null}
await RunAnywhere.stt.transcribe(audio, { wordTimestamps: true })
```

Use these for captions, or to seek a player to a spoken word. On a desktop app transcribing
long recordings, this is what makes the transcript navigable.

## Diarization

`diarization: true` labels speakers inside the transcription. For a standalone "who spoke when"
answer, use the [diarization namespace](/electron/diarization).

## Translation

`translateToEnglish: true` returns English regardless of source language.

## Long recordings

A desktop is the one platform where transcribing an hour of audio is reasonable. Word
timestamps and diarization both cost extra time per minute of audio, so turn on only what the
interface will actually show.
