Class: OpenAI::Models::Live::OutputAudioDeltaEvent

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

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(delta:, end_ms: nil, start_ms: nil, type: :"session.output_audio.delta") ⇒ Object



# File 'lib/openai/models/live/output_audio_delta_event.rb', line 35


Instance Attribute Details

#deltaString

Base64-encoded raw audio. Primary WebSocket events use the session's configured format; reflected sideband events use mono PCM16LE at 24 kHz.



12
# File 'lib/openai/models/live/output_audio_delta_event.rb', line 12

required :delta, String

#end_msInteger?

Exclusive session-relative end in milliseconds. Required on reflected sideband events; omitted on the primary WebSocket. Dropped output frames leave gaps between reflected ranges.



26
# File 'lib/openai/models/live/output_audio_delta_event.rb', line 26

optional :end_ms, Integer

#start_msInteger?

Inclusive session-relative start in milliseconds. Required on reflected sideband events; omitted on the primary WebSocket.



33
# File 'lib/openai/models/live/output_audio_delta_event.rb', line 33

optional :start_ms, Integer

#type:"session.output_audio.delta"

The event type, always session.output_audio.delta.



18
# File 'lib/openai/models/live/output_audio_delta_event.rb', line 18

required :type, const: :"session.output_audio.delta"

Instance Method Details

#to_hash{



57
# File 'sig/openai/models/live/output_audio_delta_event.rbs', line 57

def to_hash: -> {