Class: OpenAI::Models::Realtime::TranscriptionSessionUpdatedEvent::Session

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

Overview

See Also:

  • OpenAI::Models::Realtime::TranscriptionSessionUpdatedEvent#session

Defined Under Namespace

Modules: Modality Classes: ClientSecret, TurnDetection

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, 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, #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(expires_at:, value:) ⇒ Object

Some parameter documentations has been truncated, see ClientSecret for more details.

Ephemeral key returned by the API. Only present when the session is created on the server via REST API.

Parameters:

  • expires_at (Integer)

    Timestamp for when the token expires. Currently, all tokens expire

  • value (String)

    Ephemeral key usable in client environments to authenticate connections



# File 'lib/openai/models/realtime/transcription_session_updated_event.rb', line 79

Instance Attribute Details

#client_secretOpenAI::Models::Realtime::TranscriptionSessionUpdatedEvent::Session::ClientSecret

Ephemeral key returned by the API. Only present when the session is created on the server via REST API.

Parameters:

  • value (OpenAI::Realtime::TranscriptionSessionUpdatedEvent::Session::ClientSecret)

Returns:



49
# File 'lib/openai/models/realtime/transcription_session_updated_event.rb', line 49

required :client_secret, -> { OpenAI::Realtime::TranscriptionSessionUpdatedEvent::Session::ClientSecret }

#input_audio_formatString?

The format of input audio. Options are pcm16, g711_ulaw, or g711_alaw.

Parameters:

  • (String)

Returns:

  • (String, nil)


55
# File 'lib/openai/models/realtime/transcription_session_updated_event.rb', line 55

optional :input_audio_format, String

#input_audio_transcriptionOpenAI::Models::Realtime::AudioTranscription?



60
# File 'lib/openai/models/realtime/transcription_session_updated_event.rb', line 60

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

#modalitiesArray<Symbol, OpenAI::Models::Realtime::TranscriptionSessionUpdatedEvent::Session::Modality>?

The set of modalities the model can respond with. To disable audio, set this to ["text"].



67
68
# File 'lib/openai/models/realtime/transcription_session_updated_event.rb', line 67

optional :modalities,
-> { OpenAI::Internal::Type::ArrayOf[enum: OpenAI::Realtime::TranscriptionSessionUpdatedEvent::Session::Modality] }

#turn_detectionOpenAI::Models::Realtime::TranscriptionSessionUpdatedEvent::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.



76
77
# File 'lib/openai/models/realtime/transcription_session_updated_event.rb', line 76

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

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/realtime/transcription_session_updated_event.rb', line 136

Instance Method Details

#to_hash{

Returns:

  • ({)


72
# File 'sig/openai/models/realtime/transcription_session_updated_event.rbs', line 72

def to_hash: -> {