Class: OpenAI::Models::Realtime::RealtimeTranscriptionSessionAudioInputTurnDetection::SemanticVad

Inherits:
Internal::Type::BaseModel
  • Object
show all
Defined in:
lib/openai/models/realtime/realtime_transcription_session_audio_input_turn_detection.rb,
sig/openai/models/realtime/realtime_transcription_session_audio_input_turn_detection.rbs

Defined Under Namespace

Modules: Eagerness

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(create_response: nil, eagerness: nil, interrupt_response: nil, type: :semantic_vad) ⇒ SemanticVad

Returns a new instance of SemanticVad.

Parameters:

  • create_response (defaults to: nil) —

    Whether or not to automatically generate a response when a VAD stop event occurs.

  • eagerness (defaults to: nil) —

    Used only for semantic_vad mode. The eagerness of the model to respond. low will wait longer for the user to continue speaking, high will respond more quickly. auto is the default and is equivalent to medium. low, medium, and high have max timeouts of 8s, 4s, and 2s respectively.

  • interrupt_response (defaults to: nil) —

    Whether or not to automatically interrupt any ongoing response with output to the default conversation (i.e. conversation of auto) when a VAD start event occurs.

  • type (defaults to: :semantic_vad) —

    Type of turn detection, semantic_vad to turn on Semantic VAD.

  • create_response: (Boolean) (defaults to: nil)
  • eagerness: (OpenAI::Models::Realtime::RealtimeTranscriptionSessionAudioInputTurnDetection::SemanticVad::eagerness) (defaults to: nil)
  • interrupt_response: (Boolean) (defaults to: nil)
  • type: (:semantic_vad) (defaults to: :semantic_vad)


# File 'lib/openai/models/realtime/realtime_transcription_session_audio_input_turn_detection.rb', line 196

Instance Attribute Details

#create_response ⇒ Boolean?

Whether or not to automatically generate a response when a VAD stop event occurs.

Returns:



174
# File 'lib/openai/models/realtime/realtime_transcription_session_audio_input_turn_detection.rb', line 174

optional :create_response, OpenAI::Internal::Type::Boolean

#eagerness ⇒ OpenAI::Models::Realtime::RealtimeTranscriptionSessionAudioInputTurnDetection::SemanticVad::eagerness?

Used only for semantic_vad mode. The eagerness of the model to respond. low will wait longer for the user to continue speaking, high will respond more quickly. auto is the default and is equivalent to medium. low, medium, and high have max timeouts of 8s, 4s, and 2s respectively.

Returns:

  • (OpenAI::Models::Realtime::RealtimeTranscriptionSessionAudioInputTurnDetection::SemanticVad::eagerness, nil)


183
184
185
186
# File 'lib/openai/models/realtime/realtime_transcription_session_audio_input_turn_detection.rb', line 183

optional(
  :eagerness,
  enum: -> { OpenAI::Realtime::RealtimeTranscriptionSessionAudioInputTurnDetection::SemanticVad::Eagerness }
)

#interrupt_response ⇒ Boolean?

Whether or not to automatically interrupt any ongoing response with output to the default conversation (i.e. conversation of auto) when a VAD start event occurs.

Returns:



194
# File 'lib/openai/models/realtime/realtime_transcription_session_audio_input_turn_detection.rb', line 194

optional :interrupt_response, OpenAI::Internal::Type::Boolean

#type ⇒ :semantic_vad

Type of turn detection, semantic_vad to turn on Semantic VAD.

Returns:

  • (:semantic_vad)


167
# File 'lib/openai/models/realtime/realtime_transcription_session_audio_input_turn_detection.rb', line 167

required :type, const: :semantic_vad

Instance Method Details

#to_hash ⇒ { ?type: :semantic_vad, ?create_response: bool, ?eagerness: OpenAI::Models::Realtime::RealtimeTranscriptionSessionAudioInputTurnDetection::SemanticVad::eagerness, ?interrupt_response: bool }

Returns:

  • ({ ?type: :semantic_vad, ?create_response: bool, ?eagerness: OpenAI::Models::Realtime::RealtimeTranscriptionSessionAudioInputTurnDetection::SemanticVad::eagerness, ?interrupt_response: bool })


229
230
231
232
233
234
# File 'sig/openai/models/realtime/realtime_transcription_session_audio_input_turn_detection.rbs', line 229

def to_hash: -> {
  ?type: :semantic_vad,
  ?create_response: bool,
  ?eagerness: OpenAI::Models::Realtime::RealtimeTranscriptionSessionAudioInputTurnDetection::SemanticVad::eagerness,
  ?interrupt_response: bool
}