Class: OpenAI::Models::Live::InputAudioAppendEvent

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/live/input_audio_append_event.rb,
sig/openai/models/live/input_audio_append_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(audio:, event_id: nil, type: :"session.input_audio.append") ⇒ Object

Send audio to a Live session over its primary WebSocket. WebRTC and SIP sessions send audio over their media transport.

Parameters:

  • Base64-encoded raw audio in the startup-selected format, without a WAV or other container header. Primary WebSocket only; media transports use their audio track. Audio appends have no acknowledgment. Reflected sideband server events reuse this event type and audio key, with no timestamps or event_id; their audio is always mono PCM16LE at 24 kHz.

  • (defaults to: nil)

    Optional client identifier for correlating this command with a server event's client_event_id or error.client_event_id.

  • (defaults to: :"session.input_audio.append")

    The Live client event type. Always session.input_audio.append.



# File 'lib/openai/models/live/input_audio_append_event.rb', line 30

Instance Attribute Details

#audioString

Base64-encoded raw audio in the startup-selected format, without a WAV or other container header. Primary WebSocket only; media transports use their audio track. Audio appends have no acknowledgment. Reflected sideband server events reuse this event type and audio key, with no timestamps or event_id; their audio is always mono PCM16LE at 24 kHz.

Parameters:

Returns:



15
# File 'lib/openai/models/live/input_audio_append_event.rb', line 15

required :audio, String

#event_idString?

Optional client identifier for correlating this command with a server event's client_event_id or error.client_event_id.

Parameters:

Returns:



28
# File 'lib/openai/models/live/input_audio_append_event.rb', line 28

optional :event_id, String, nil?: true

#typeSymbol, :"session.input_audio.append"

The Live client event type. Always session.input_audio.append.

Parameters:

Returns:



21
# File 'lib/openai/models/live/input_audio_append_event.rb', line 21

required :type, const: :"session.input_audio.append"

Instance Method Details

#to_hash{

Returns:



24
# File 'sig/openai/models/live/input_audio_append_event.rbs', line 24

def to_hash: -> {