Class: OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/realtime/realtime_response_create_audio_output.rb,
sig/openai/models/realtime/realtime_response_create_audio_output.rbs

Overview

See Also:

  • OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput#output

Defined Under Namespace

Modules: Voice

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, fields, hash, #hash, inherited, #inspect, inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

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

Methods included from Internal::Util::SorbetRuntimeSupport

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

Constructor Details

#initialize(format_: nil, voice: nil) ⇒ Output

Returns a new instance of Output.

Parameters:

  • format_ (defaults to: nil) —

    The format of the output audio.

  • voice (defaults to: nil) —

    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.

  • format_: (OpenAI::Models::Realtime::realtime_audio_formats) (defaults to: nil)
  • voice: (OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::voice) (defaults to: nil)


# File 'lib/openai/models/realtime/realtime_response_create_audio_output.rb', line 37

Instance Attribute Details

#format_ ⇒ OpenAI::Models::Realtime::realtime_audio_formats?

The format of the output audio.

Returns:

  • (OpenAI::Models::Realtime::realtime_audio_formats, nil)


23
# File 'lib/openai/models/realtime/realtime_response_create_audio_output.rb', line 23

optional :format_, union: -> { OpenAI::Realtime::RealtimeAudioFormats }, api_name: :format

#voice ⇒ OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::voice?

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.

Returns:

  • (OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::voice, nil)


35
# File 'lib/openai/models/realtime/realtime_response_create_audio_output.rb', line 35

optional :voice, union: -> { OpenAI::Realtime::RealtimeResponseCreateAudioOutput::Output::Voice }

Instance Method Details

#to_hash ⇒ { ?format_: OpenAI::Models::Realtime::realtime_audio_formats, ?voice: OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::voice }

Returns:

  • ({ ?format_: OpenAI::Models::Realtime::realtime_audio_formats, ?voice: OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::voice })


72
73
74
75
# File 'sig/openai/models/realtime/realtime_response_create_audio_output.rbs', line 72

def to_hash: -> {
  ?format_: OpenAI::Models::Realtime::realtime_audio_formats,
  ?voice: OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::voice
}