Class: OpenAI::Models::Realtime::RealtimeTranscriptionSessionCreateRequest

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/realtime/realtime_transcription_session_create_request.rb

Defined Under Namespace

Modules: Include, InputAudioFormat, Model Classes: InputAudioNoiseReduction, InputAudioTranscription, 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(model: , include: nil, input_audio_format: nil, input_audio_noise_reduction: nil, input_audio_transcription: nil, turn_detection: nil, type: :transcription) ⇒ Object

Some parameter documentations has been truncated, see OpenAI::Models::Realtime::RealtimeTranscriptionSessionCreateRequest for more details.

Realtime transcription session object configuration.

Parameters:



# File 'lib/openai/models/realtime/realtime_transcription_session_create_request.rb', line 69

Instance Attribute Details

#includeArray<Symbol, OpenAI::Models::Realtime::RealtimeTranscriptionSessionCreateRequest::Include>?

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

  • ‘item.input_audio_transcription.logprobs`



28
29
# File 'lib/openai/models/realtime/realtime_transcription_session_create_request.rb', line 28

optional :include,
-> { OpenAI::Internal::Type::ArrayOf[enum: OpenAI::Realtime::RealtimeTranscriptionSessionCreateRequest::Include] }

#input_audio_formatSymbol, ...

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.



37
38
# File 'lib/openai/models/realtime/realtime_transcription_session_create_request.rb', line 37

optional :input_audio_format,
enum: -> { OpenAI::Realtime::RealtimeTranscriptionSessionCreateRequest::InputAudioFormat }

#input_audio_noise_reductionOpenAI::Models::Realtime::RealtimeTranscriptionSessionCreateRequest::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.



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

optional :input_audio_noise_reduction,
-> { OpenAI::Realtime::RealtimeTranscriptionSessionCreateRequest::InputAudioNoiseReduction }

#input_audio_transcriptionOpenAI::Models::Realtime::RealtimeTranscriptionSessionCreateRequest::InputAudioTranscription?

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



57
58
# File 'lib/openai/models/realtime/realtime_transcription_session_create_request.rb', line 57

optional :input_audio_transcription,
-> { OpenAI::Realtime::RealtimeTranscriptionSessionCreateRequest::InputAudioTranscription }

#modelString, ...

ID of the model to use. The options are ‘gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, and `whisper-1` (which is powered by our open source Whisper V2 model).



13
# File 'lib/openai/models/realtime/realtime_transcription_session_create_request.rb', line 13

required :model, union: -> { OpenAI::Realtime::RealtimeTranscriptionSessionCreateRequest::Model }

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



66
67
# File 'lib/openai/models/realtime/realtime_transcription_session_create_request.rb', line 66

optional :turn_detection,
-> { OpenAI::Realtime::RealtimeTranscriptionSessionCreateRequest::TurnDetection }

#typeSymbol, :transcription

The type of session to create. Always ‘transcription` for transcription sessions.

Returns:

  • (Symbol, :transcription)


20
# File 'lib/openai/models/realtime/realtime_transcription_session_create_request.rb', line 20

required :type, const: :transcription

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/realtime/realtime_transcription_session_create_request.rb', line 127