Class: OpenAI::Models::Realtime::TranscriptionSessionUpdate::Session::TurnDetection

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

Overview

See Also:

  • OpenAI::Models::Realtime::TranscriptionSessionUpdate::Session#turn_detection

Defined Under Namespace

Modules: Type

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(prefix_padding_ms: nil, silence_duration_ms: nil, threshold: nil, type: nil) ⇒ Object

Parameters:

  • prefix_padding_ms (defaults to: nil) —

    Amount of audio to include before the VAD detected speech (in milliseconds). Defaults to 300ms.

  • silence_duration_ms (defaults to: nil) —

    Duration of silence to detect speech stop (in milliseconds). Defaults to 500ms. With shorter values the model will respond more quickly, but may jump in on short pauses from the user.

  • threshold (defaults to: nil) —

    Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A higher threshold will require louder audio to activate the model, and thus might perform better in noisy environments.

  • type (defaults to: nil) —

    Type of turn detection. Only server_vad is currently supported for transcription sessions.



# File 'lib/openai/models/realtime/transcription_session_update.rb', line 199

Instance Attribute Details

#prefix_padding_ms ⇒ Integer?

Amount of audio to include before the VAD detected speech (in milliseconds). Defaults to 300ms.

Returns:

  • (Integer, nil)


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

optional :prefix_padding_ms, Integer

#silence_duration_ms ⇒ Integer?

Duration of silence to detect speech stop (in milliseconds). Defaults to 500ms. With shorter values the model will respond more quickly, but may jump in on short pauses from the user.

Returns:

  • (Integer, nil)


182
# File 'lib/openai/models/realtime/transcription_session_update.rb', line 182

optional :silence_duration_ms, Integer

#threshold ⇒ Float?

Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A higher threshold will require louder audio to activate the model, and thus might perform better in noisy environments.

Returns:

  • (Float, nil)


190
# File 'lib/openai/models/realtime/transcription_session_update.rb', line 190

optional :threshold, Float

#type ⇒ OpenAI::Models::Realtime::TranscriptionSessionUpdate::Session::TurnDetection::type_?

Type of turn detection. Only server_vad is currently supported for transcription sessions.

Returns:

  • (OpenAI::Models::Realtime::TranscriptionSessionUpdate::Session::TurnDetection::type_, nil)


197
# File 'lib/openai/models/realtime/transcription_session_update.rb', line 197

optional :type, enum: -> { OpenAI::Realtime::TranscriptionSessionUpdate::Session::TurnDetection::Type }

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


270
# File 'sig/openai/models/realtime/transcription_session_update.rbs', line 270

def to_hash: -> {