Module: OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::Voice

Extended by:
Internal::Type::Union
Defined in:
lib/openai/models/realtime/realtime_response_create_audio_output.rb,
sig/openai/models/realtime/realtime_response_create_audio_output.rbs

Overview

The voice the model uses to respond. Supported built-in voices are alloy, ash, ballad, coral, echo, sage, shimmer, verse, marin, and cedar. You may also provide a custom voice object with an id, for example { "id": "voice_1234" }. Voice cannot be changed during the session once the model has responded with audio at least once. Custom voices must be created from audio samples. Voices created from text prompts are supported only in Live. We recommend marin and cedar for best quality.

See Also:

  • OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output#voice

Defined Under Namespace

Classes: ID

collapse

ALLOY =

Returns:

  • (:alloy)
:alloy
ASH =

Returns:

  • (:ash)
:ash
BALLAD =

Returns:

  • (:ballad)
:ballad
CORAL =

Returns:

  • (:coral)
:coral
ECHO =

Returns:

  • (:echo)
:echo
SAGE =

Returns:

  • (:sage)
:sage
SHIMMER =

Returns:

  • (:shimmer)
:shimmer
VERSE =

Returns:

  • (:verse)
:verse
MARIN =

Returns:

  • (:marin)
:marin
CEDAR =

Returns:

  • (:cedar)
:cedar

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::Union

==, ===, coerce, derefed_variants, dump, hash, inspect, to_sorbet_type, variant_for_dump

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, coerce_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, type_info

Class Method Details

.variants ⇒ Array(String, Symbol, OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::Voice::ID)



104
105
106
107
108
109
110
111
112
# File 'lib/openai/models/realtime/realtime_response_create_audio_output.rb', line 104

define_sorbet_constant!(:Variants) do
  T.type_alias do
    T.any(
      String,
      OpenAI::Realtime::RealtimeResponseCreateAudioOutput::Output::Voice::TaggedSymbol,
      OpenAI::Realtime::RealtimeResponseCreateAudioOutput::Output::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/realtime/realtime_response_create_audio_output.rb', line 94