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

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

Defined Under Namespace

Modules: Include, InputAudioFormat Classes: InputAudioNoiseReduction, TurnDetection

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Class Method Summary collapse

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(type: nil) ⇒ Object

Parameters:

  • include —

    The set of items to include in the transcription. Current available items are: item.input_audio_transcription.logprobs

  • input_audio_format —

    The format of input audio. Options are pcm16, g711_ulaw, or g711_alaw. For pcm16, input audio must be 16-bit PCM at a 24kHz sample rate, single channel (mono), and little-endian byte order.

  • input_audio_noise_reduction —

    Configuration for input audio noise reduction. This can be set to null to turn off. Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model. Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.

  • input_audio_transcription —

    Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.

  • turn_detection —

    Configuration for turn detection. Can be set to null to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.



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

Instance Attribute Details

#include ⇒ ::Array[OpenAI::Models::Realtime::TranscriptionSessionUpdate::Session::include_]?

The set of items to include in the transcription. Current available items are: item.input_audio_transcription.logprobs

Returns:

  • (::Array[OpenAI::Models::Realtime::TranscriptionSessionUpdate::Session::include_], nil)


44
45
46
47
48
49
# File 'lib/openai/models/realtime/transcription_session_update.rb', line 44

optional(
  :include,
  -> {
    OpenAI::Internal::Type::ArrayOf[enum: OpenAI::Realtime::TranscriptionSessionUpdate::Session::Include]
  }
)

#input_audio_format ⇒ OpenAI::Models::Realtime::TranscriptionSessionUpdate::Session::input_audio_format?

The format of input audio. Options are pcm16, g711_ulaw, or g711_alaw. For pcm16, input audio must be 16-bit PCM at a 24kHz sample rate, single channel (mono), and little-endian byte order.

Returns:

  • (OpenAI::Models::Realtime::TranscriptionSessionUpdate::Session::input_audio_format, nil)


57
58
59
60
# File 'lib/openai/models/realtime/transcription_session_update.rb', line 57

optional(
  :input_audio_format,
  enum: -> { OpenAI::Realtime::TranscriptionSessionUpdate::Session::InputAudioFormat }
)

#input_audio_noise_reduction ⇒ OpenAI::Realtime::TranscriptionSessionUpdate::Session::InputAudioNoiseReduction?

Configuration for input audio noise reduction. This can be set to null to turn off. Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model. Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.

Returns:

  • (OpenAI::Realtime::TranscriptionSessionUpdate::Session::InputAudioNoiseReduction, nil)


70
71
72
73
# File 'lib/openai/models/realtime/transcription_session_update.rb', line 70

optional(
  :input_audio_noise_reduction,
  -> { OpenAI::Realtime::TranscriptionSessionUpdate::Session::InputAudioNoiseReduction }
)

#input_audio_transcription ⇒ OpenAI::Realtime::AudioTranscription?

Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.

Returns:

  • (OpenAI::Realtime::AudioTranscription, nil)


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

optional :input_audio_transcription, -> { OpenAI::Realtime::AudioTranscription }

#turn_detection ⇒ OpenAI::Realtime::TranscriptionSessionUpdate::Session::TurnDetection?

Configuration for turn detection. Can be set to null to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.

Returns:

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


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

optional :turn_detection, -> { OpenAI::Realtime::TranscriptionSessionUpdate::Session::TurnDetection }

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


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

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


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

def to_hash: -> {