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)
Summary
Functions
Create new TTS settings with the given options.
Types
@type t() :: %Codex.Voice.Config.TTSSettings{ buffer_size: non_neg_integer(), instructions: String.t(), speed: float() | nil, voice: voice() | nil }
@type voice() ::
:alloy | :ash | :coral | :echo | :fable | :onyx | :nova | :sage | :shimmer
Available TTS voice options.
Functions
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