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_with_error, dump, #dump, #inspect, inspect, meta_info, new_coerce_state, 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) ⇒ Object

Startup audio configuration. Only primary WebSockets accept audio.format; WebRTC and SIP negotiate their media format. Voice and format are immutable after startup.

Parameters:



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

Instance Attribute Details

#format_OpenAI::Models::Live::AudioFormat::AudioPCM, ...

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



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

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

#outputOpenAI::Models::Live::SessionResource::Audio::Output?

The voice used for speech generated by the Live model.



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

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

Instance Method Details

#to_hash{

Returns:

  • ({)


111
# File 'sig/openai/models/live/session_resource.rbs', line 111

def to_hash: -> {