Class: OpenAI::Models::Realtime::InputAudioBufferSpeechStoppedEvent

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/realtime/input_audio_buffer_speech_stopped_event.rb,
sig/openai/models/realtime/input_audio_buffer_speech_stopped_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_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(audio_end_ms:, event_id:, item_id:, type: :"input_audio_buffer.speech_stopped") ⇒ InputAudioBufferSpeechStoppedEvent

Returns a new instance of InputAudioBufferSpeechStoppedEvent.

Parameters:

  • audio_end_ms —

    Milliseconds since the session started when speech stopped. This will correspond to the end of audio sent to the model, and thus includes the min_silence_duration_ms configured in the Session.

  • event_id —

    The unique ID of the server event.

  • item_id —

    The ID of the user message item that will be created.

  • type (defaults to: :"input_audio_buffer.speech_stopped") —

    The event type, must be input_audio_buffer.speech_stopped.

  • audio_end_ms: (Integer)
  • event_id: (String)
  • item_id: (String)
  • type: (:"input_audio_buffer.speech_stopped") (defaults to: :"input_audio_buffer.speech_stopped")


# File 'lib/openai/models/realtime/input_audio_buffer_speech_stopped_event.rb', line 33

Instance Attribute Details

#audio_end_ms ⇒ Integer

Milliseconds since the session started when speech stopped. This will correspond to the end of audio sent to the model, and thus includes the min_silence_duration_ms configured in the Session.

Returns:

  • (Integer)


13
# File 'lib/openai/models/realtime/input_audio_buffer_speech_stopped_event.rb', line 13

required :audio_end_ms, Integer

#event_id ⇒ String

The unique ID of the server event.

Returns:

  • (String)


19
# File 'lib/openai/models/realtime/input_audio_buffer_speech_stopped_event.rb', line 19

required :event_id, String

#item_id ⇒ String

The ID of the user message item that will be created.

Returns:

  • (String)


25
# File 'lib/openai/models/realtime/input_audio_buffer_speech_stopped_event.rb', line 25

required :item_id, String

#type ⇒ :"input_audio_buffer.speech_stopped"

The event type, must be input_audio_buffer.speech_stopped.

Returns:

  • (:"input_audio_buffer.speech_stopped")


31
# File 'lib/openai/models/realtime/input_audio_buffer_speech_stopped_event.rb', line 31

required :type, const: :"input_audio_buffer.speech_stopped"

Instance Method Details

#to_hash ⇒ { audio_end_ms: Integer, event_id: String, item_id: String, ?type: :"input_audio_buffer.speech_stopped" }

Returns:

  • ({ audio_end_ms: Integer, event_id: String, item_id: String, ?type: :"input_audio_buffer.speech_stopped" })


44
45
46
47
48
49
# File 'sig/openai/models/realtime/input_audio_buffer_speech_stopped_event.rbs', line 44

def to_hash: -> {
  audio_end_ms: Integer,
  event_id: String,
  item_id: String,
  ?type: :"input_audio_buffer.speech_stopped"
}