Class: OpenAI::Models::Realtime::RealtimeAudioConfig::Input::Transcription

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

Overview

See Also:

Defined Under Namespace

Modules: Model

Instance Attribute 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(language: nil, model: nil, prompt: nil) ⇒ Object

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

Configuration for input audio transcription, defaults to off and can be set to ‘null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](platform.openai.com/docs/api-reference/audio/createTranscription) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.

Parameters:

  • language (String) (defaults to: nil)

    The language of the input audio. Supplying the input language in

  • model (Symbol, OpenAI::Models::Realtime::RealtimeAudioConfig::Input::Transcription::Model) (defaults to: nil)

    The model to use for transcription. Current options are

  • prompt (String) (defaults to: nil)

    An optional text to guide the model’s style or continue a previous audio



# File 'lib/openai/models/realtime/realtime_audio_config.rb', line 170

Instance Attribute Details

#languageString?

The language of the input audio. Supplying the input language in [ISO-639-1](en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. ‘en`) format will improve accuracy and latency.

Returns:

  • (String, nil)


150
# File 'lib/openai/models/realtime/realtime_audio_config.rb', line 150

optional :language, String

#modelSymbol, ...

The model to use for transcription. Current options are ‘whisper-1`, `gpt-4o-transcribe-latest`, `gpt-4o-mini-transcribe`, `gpt-4o-transcribe`, and `gpt-4o-transcribe-diarize`.



158
# File 'lib/openai/models/realtime/realtime_audio_config.rb', line 158

optional :model, enum: -> { OpenAI::Realtime::RealtimeAudioConfig::Input::Transcription::Model }

#promptString?

An optional text to guide the model’s style or continue a previous audio segment. For ‘whisper-1`, the [prompt is a list of keywords](platform.openai.com/docs/guides/speech-to-text#prompting). For `gpt-4o-transcribe` models, the prompt is a free text string, for example “expect words related to technology”.

Returns:

  • (String, nil)


168
# File 'lib/openai/models/realtime/realtime_audio_config.rb', line 168

optional :prompt, String