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

# Voices

> List and select a speaking voice

```ts theme={null}
const voices = await RunAnywhere.tts.voices()
```

## Signature

```ts theme={null}
voices(): Promise<Voice[]>
```

The list reflects the loaded speech model, so call it after the model is in place rather than
at launch. Load a different TTS model and the list changes.

## Selecting one

```ts theme={null}
await RunAnywhere.tts.speak('Hello', { voice: 'en_US-amy-medium' })
```

With `voice` unset, the model's own default is used.

## Language and voice are separate

`language` sets the language code; `voice` picks a speaker. A multi-voice model exposes several
speakers for one language, and a single-voice model ignores `voice` entirely.

```ts theme={null}
await RunAnywhere.tts.speak('Hello', {
  voice: 'en_US-amy-medium',
  language: 'en-US',
  speed: 1.0,
  pitch: 1.0,
})
```

## A voice picker in settings

```ts theme={null}
const voices = await RunAnywhere.tts.voices()

for (const voice of voices) {
  const option = document.createElement('option')
  option.value = String(voice)
  option.textContent = String(voice)
  select.append(option)
}

preview.addEventListener('click', async () => {
  await RunAnywhere.tts.speak('This is how I sound.', { voice: select.value })
})
```

Persist the choice in the app's local store rather than re-asking. A desktop app is expected to
remember settings across launches.
