# `Codex.Voice.Config.TTSSettings`
[🔗](https://github.com/nshkrdotcom/codex_sdk/blob/v0.18.1/lib/codex/voice/config/tts_settings.ex#L1)

Settings for text-to-speech models.

## Fields

- `:voice` - The voice to use for TTS. If not provided, the model's default is used.
- `:buffer_size` - Minimal size of audio chunks being streamed out (default: 120)
- `:instructions` - Instructions for the TTS model to follow
- `:speed` - Playback speed between 0.25 and 4.0 (optional)

# `t`

```elixir
@type t() :: %Codex.Voice.Config.TTSSettings{
  buffer_size: non_neg_integer(),
  instructions: String.t(),
  speed: float() | nil,
  voice: voice() | nil
}
```

# `voice`

```elixir
@type voice() ::
  :alloy | :ash | :coral | :echo | :fable | :onyx | :nova | :sage | :shimmer
```

Available TTS voice options.

# `new`

```elixir
@spec new(keyword()) :: t()
```

Create new TTS settings with the given options.

## Options

- `:voice` - The voice to use (`:alloy`, `:ash`, `:coral`, `:echo`, `:fable`, `:onyx`, `:nova`, `:sage`, `:shimmer`)
- `:buffer_size` - Minimal audio chunk size (default: 120)
- `:instructions` - Instructions for the model
- `:speed` - Playback speed between 0.25 and 4.0

## Examples

    iex> settings = Codex.Voice.Config.TTSSettings.new(voice: :nova, speed: 1.2)
    iex> settings.voice
    :nova

---

*Consult [api-reference.md](api-reference.md) for complete listing*
