Module: OpenAI::Models::Chat::ChatCompletionAudioParam::Voice

Extended by:
Internal::Type::Union
Defined in:
lib/openai/models/chat/chat_completion_audio_param.rb

Overview

The voice the model uses to respond. Supported built-in voices are ‘alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, `shimmer`, `marin`, and `cedar`. You may also provide a custom voice object with an `id`, for example `{ “id”: “voice_1234” }`.

See Also:

Defined Under Namespace

Classes: ID

collapse

ALLOY =
:alloy
ASH =
:ash
BALLAD =
:ballad
CORAL =
:coral
ECHO =
:echo
SAGE =
:sage
SHIMMER =
:shimmer
VERSE =
:verse
MARIN =
:marin
CEDAR =
:cedar

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::Union

==, ===, coerce, dump, hash, inspect, to_sorbet_type, variants

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Class Method Details

.variantsArray(String, Symbol, OpenAI::Models::Chat::ChatCompletionAudioParam::Voice::ID)



103
104
105
106
107
108
109
110
111
# File 'lib/openai/models/chat/chat_completion_audio_param.rb', line 103

define_sorbet_constant!(:Variants) do
  T.type_alias do
    T.any(
      String,
      OpenAI::Chat::ChatCompletionAudioParam::Voice::TaggedSymbol,
      OpenAI::Chat::ChatCompletionAudioParam::Voice::ID
    )
  end
end

Instance Method Details

#initialize(id:) ⇒ Object

Custom voice reference.

Parameters:

  • id (String)

    The custom voice ID, e.g. ‘voice_1234`.



# File 'lib/openai/models/chat/chat_completion_audio_param.rb', line 94