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

# rime tts

> Synthesize text to speech from the command line using the Rime CLI.

Synthesize text to speech in WAV or MP3. The CLI picks the format from the model: `mist` and `mistv2` output MP3, while `coda` and `mistv3` default to WAV. Use `--format` to override.

```bash theme={null}
rime tts TEXT --speaker VOICE --model-id MODEL
```

<img src="https://mintcdn.com/rimelabs/hWWUVCw6mopaejUP/images/cli/tts-demo.gif?s=8e99e28c8c1ddda3eb1929a8bf3a2979" alt="Demo of the rime tts command" width="1080" height="480" data-path="images/cli/tts-demo.gif" />

## Required flags

| Flag         | Short | Description                                              |
| ------------ | ----- | -------------------------------------------------------- |
| `--speaker`  | `-s`  | Voice speaker to use (e.g., `astra`, `celeste`, `orion`) |
| `--model-id` | `-m`  | Model ID: `coda`, `mistv3`, `mistv2`, or `mist`          |

## Optional flags

| Flag              | Short | Default | Description                                                                                                          |
| ----------------- | ----- | ------- | -------------------------------------------------------------------------------------------------------------------- |
| `--output`        | `-o`  | --      | Output file path. Use `-` for stdout. If omitted, plays audio directly                                               |
| `--play`          | `-p`  | `false` | Play audio after synthesis (default behavior when no output is specified)                                            |
| `--lang`          | `-l`  | --      | BCP 47 language tag (e.g., `en`, `es`, `fr`). Defaults to the model's own language                                   |
| `--format`        | `-f`  | --      | Audio format: `wav` or `mp3` (overrides model default)                                                               |
| `--speed-alpha`   | --    | `1`     | Speed multiplier. For `mist`/`mistv2`: lower is faster. For `coda` and `mistv3`: higher is faster                    |
| `--sampling-rate` | --    | --      | Output sampling rate in Hz. Coda: `8000`, `16000`, `22050`, `24000`, `44100`, `48000`, `96000`. Mist: `4000`–`44100` |
| `--api-url`       | --    | --      | API URL (default: `$RIME_API_URL` or `https://users.rime.ai/v1/rime-tts`)                                            |

## Coda flags

These flags apply to Coda requests:

| Flag                   | Default | Description                      |
| ---------------------- | ------- | -------------------------------- |
| `--max-tokens`         | `1200`  | Max output tokens (200–5000)     |
| `--temperature`        | `0.5`   | Sampling temperature (0–1)       |
| `--top-p`              | `1`     | Nucleus sampling threshold (0–1) |
| `--repetition-penalty` | `1.5`   | Repetition penalty (1–2)         |

## mist/mistv2/mistv3 flags

| Flag                         | Description                              |
| ---------------------------- | ---------------------------------------- |
| `--inline-time-scale-factor` | Comma-separated per-segment speed values |
| `--pause-between-brackets`   | Insert pause at bracketed markers        |

## mist/mistv2 flags

Only `mist` and `mistv2` support these flags; `mistv3` does not.

| Flag                           | Description                                                                         |
| ------------------------------ | ----------------------------------------------------------------------------------- |
| `--phonemize-between-brackets` | Phonemize text in brackets (see [Custom pronunciation](/docs/custom-pronunciation)) |
| `--no-text-normalization`      | Disable text normalization                                                          |
| `--save-oovs`                  | Save out-of-vocabulary words                                                        |

## Examples

```bash theme={null}
# Play audio directly through speakers
rime tts "Hello world" -s astra -m coda

# Save to a WAV file
rime tts "Hello world" -s astra -m coda -o output.wav

# Pipe audio to stdout
rime tts "Hello world" -s astra -m coda -o - > audio.wav

# Use mistv3 (WAV by default)
rime tts "Hello world" -s peak -m mistv3

# Use mistv2 (outputs MP3 by default)
rime tts "Hello world" -s peak -m mistv2

# Synthesize in Spanish with Coda
rime tts "Hola mundo" -s astra -m coda -l es

# JSON output with timing metadata
rime tts "Hello world" -s astra -m coda -o output.wav --json
```

## Language

Omit `--lang` and the model synthesizes in its own language, which is what you
want for a voice that speaks one language. Pass a BCP 47 tag to be explicit.

The CLI does not check `--lang`: it sends the value as given, and the API
rejects a tag the model cannot serve. See [Languages](/docs/voices#languages)
for what each model supports.
