Class: OpenAI::Models::Live::SessionResource::Audio

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

Overview

See Also:

  • OpenAI::Models::Live::SessionResource#audio

Defined Under Namespace

Classes: Output

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, output: nil) ⇒ Audio

Returns a new instance of Audio.

Parameters:

  • format_ (defaults to: nil) —

    Audio encoding and sample rate for audio sent and received over a Live WebSocket connection. WebRTC and SIP negotiate their media format separately.

  • output (defaults to: nil) —

    The voice used for speech generated by the Live model.

  • format_: (OpenAI::Models::Live::audio_format) (defaults to: nil)
  • output: (OpenAI::Live::SessionResource::Audio::Output) (defaults to: nil)


# File 'lib/openai/models/live/session_resource.rb', line 205

Instance Attribute Details

#format_ ⇒ OpenAI::Models::Live::audio_format?

Audio encoding and sample rate for audio sent and received over a Live WebSocket connection. WebRTC and SIP negotiate their media format separately.

Returns:

  • (OpenAI::Models::Live::audio_format, nil)


197
# File 'lib/openai/models/live/session_resource.rb', line 197

optional :format_, union: -> { OpenAI::Live::AudioFormat }, api_name: :format

#output ⇒ OpenAI::Live::SessionResource::Audio::Output?

The voice used for speech generated by the Live model.

Returns:

  • (OpenAI::Live::SessionResource::Audio::Output, nil)


203
# File 'lib/openai/models/live/session_resource.rb', line 203

optional :output, -> { OpenAI::Live::SessionResource::Audio::Output }

Instance Method Details

#to_hash ⇒ { ?format_: OpenAI::Models::Live::audio_format, ?output: OpenAI::Live::SessionResource::Audio::Output }

Returns:

  • ({ ?format_: OpenAI::Models::Live::audio_format, ?output: OpenAI::Live::SessionResource::Audio::Output })


231
232
233
234
# File 'sig/openai/models/live/session_resource.rbs', line 231

def to_hash: -> {
  ?format_: OpenAI::Models::Live::audio_format,
  ?output: OpenAI::Live::SessionResource::Audio::Output
}