Class: OpenAI::Models::Realtime::RealtimeTranslationSessionCreateRequest::Audio::Input::NoiseReduction

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

Overview

See Also:

  • OpenAI::Models::Realtime::RealtimeTranslationSessionCreateRequest::Audio::Input#noise_reduction

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 ⇒ NoiseReduction

Returns a new instance of NoiseReduction.

Parameters:

  • type —

    Type of noise reduction. near_field is for close-talking microphones such as headphones, far_field is for far-field microphones such as laptop or conference room microphones.

  • strength —

    Input noise suppression strength. Higher values apply more suppression. Defaults to 1 when noise reduction is first enabled. Omitting strength from a session update preserves the current strength.

  • type: (OpenAI::Models::Realtime::noise_reduction_type)
  • strength: (Float)


126
127
128
129
# File 'sig/openai/models/realtime/realtime_translation_session_create_request.rbs', line 126

def initialize: (
  type: OpenAI::Models::Realtime::noise_reduction_type,
  ?strength: Float
) -> void

Instance Attribute Details

#strength ⇒ Float?

Input noise suppression strength. Higher values apply more suppression. Defaults to 1 when noise reduction is first enabled. Omitting strength from a session update preserves the current strength.

Returns:

  • (Float, nil)


100
# File 'lib/openai/models/realtime/realtime_translation_session_create_request.rb', line 100

optional :strength, Float

#type ⇒ OpenAI::Models::Realtime::noise_reduction_type

Type of noise reduction. near_field is for close-talking microphones such as headphones, far_field is for far-field microphones such as laptop or conference room microphones.

Returns:

  • (OpenAI::Models::Realtime::noise_reduction_type)


92
# File 'lib/openai/models/realtime/realtime_translation_session_create_request.rb', line 92

required :type, enum: -> { OpenAI::Realtime::NoiseReductionType }

Instance Method Details

#to_hash ⇒ { type: OpenAI::Models::Realtime::noise_reduction_type, ?strength: Float }

Returns:

  • ({ type: OpenAI::Models::Realtime::noise_reduction_type, ?strength: Float })


131
132
133
134
# File 'sig/openai/models/realtime/realtime_translation_session_create_request.rbs', line 131

def to_hash: -> {
  type: OpenAI::Models::Realtime::noise_reduction_type,
  ?strength: Float
}