Class: OpenAI::Models::Audio::TranscriptionCreateParams
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Audio::TranscriptionCreateParams
- Extended by:
- Internal::Type::RequestParameters::Converter
- Includes:
- Internal::Type::RequestParameters
- Defined in:
- lib/openai/models/audio/transcription_create_params.rb
Overview
Defined Under Namespace
Modules: ChunkingStrategy, Model, TimestampGranularity
Instance Attribute Summary collapse
-
#chunking_strategy ⇒ Symbol, ...
Controls how the audio is cut into chunks.
-
#file ⇒ Pathname, ...
The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
-
#include ⇒ Array<Symbol, OpenAI::Models::Audio::TranscriptionInclude>?
Additional information to include in the transcription response.
-
#language ⇒ String?
The language of the input audio.
-
#model ⇒ String, ...
ID of the model to use.
-
#prompt ⇒ String?
An optional text to guide the model’s style or continue a previous audio segment.
-
#response_format ⇒ Symbol, ...
The format of the output, in one of these options: ‘json`, `text`, `srt`, `verbose_json`, or `vtt`.
-
#temperature ⇒ Float?
The sampling temperature, between 0 and 1.
-
#timestamp_granularities ⇒ Array<Symbol, OpenAI::Models::Audio::TranscriptionCreateParams::TimestampGranularity>?
The timestamp granularities to populate for this transcription.
Attributes included from Internal::Type::RequestParameters
Class Method Summary collapse
- .values ⇒ Array<Symbol>
- .variants ⇒ Array(Symbol, :auto, OpenAI::Models::Audio::TranscriptionCreateParams::ChunkingStrategy::VadConfig)
Instance Method Summary collapse
-
#initialize(file: , model: , chunking_strategy: nil, include: nil, language: nil, prompt: nil, response_format: nil, temperature: nil, timestamp_granularities: nil, request_options: {}) ⇒ Object
constructor
Some parameter documentations has been truncated, see TranscriptionCreateParams for more details.
Methods included from Internal::Type::RequestParameters::Converter
Methods included from Internal::Type::RequestParameters
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, 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(file: , model: , chunking_strategy: nil, include: nil, language: nil, prompt: nil, response_format: nil, temperature: nil, timestamp_granularities: nil, request_options: {}) ⇒ Object
Some parameter documentations has been truncated, see OpenAI::Models::Audio::TranscriptionCreateParams for more details.
|
# File 'lib/openai/models/audio/transcription_create_params.rb', line 97
|
Instance Attribute Details
#chunking_strategy ⇒ Symbol, ...
Controls how the audio is cut into chunks. When set to ‘“auto”`, the server first normalizes loudness and then uses voice activity detection (VAD) to choose boundaries. `server_vad` object can be provided to tweak VAD detection parameters manually. If unset, the audio is transcribed as a single block.
35 36 37 |
# File 'lib/openai/models/audio/transcription_create_params.rb', line 35 optional :chunking_strategy, union: -> { OpenAI::Audio::TranscriptionCreateParams::ChunkingStrategy }, nil?: true |
#file ⇒ Pathname, ...
The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
18 |
# File 'lib/openai/models/audio/transcription_create_params.rb', line 18 required :file, OpenAI::Internal::Type::FileInput |
#include ⇒ Array<Symbol, OpenAI::Models::Audio::TranscriptionInclude>?
Additional information to include in the transcription response. ‘logprobs` will return the log probabilities of the tokens in the response to understand the model’s confidence in the transcription. ‘logprobs` only works with response_format set to `json` and only with the models `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`.
47 |
# File 'lib/openai/models/audio/transcription_create_params.rb', line 47 optional :include, -> { OpenAI::Internal::Type::ArrayOf[enum: OpenAI::Audio::TranscriptionInclude] } |
#language ⇒ String?
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.
55 |
# File 'lib/openai/models/audio/transcription_create_params.rb', line 55 optional :language, String |
#model ⇒ String, ...
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).
26 |
# File 'lib/openai/models/audio/transcription_create_params.rb', line 26 required :model, union: -> { OpenAI::Audio::TranscriptionCreateParams::Model } |
#prompt ⇒ String?
An optional text to guide the model’s style or continue a previous audio segment. The [prompt](platform.openai.com/docs/guides/speech-to-text#prompting) should match the audio language.
64 |
# File 'lib/openai/models/audio/transcription_create_params.rb', line 64 optional :prompt, String |
#response_format ⇒ Symbol, ...
The format of the output, in one of these options: ‘json`, `text`, `srt`, `verbose_json`, or `vtt`. For `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`, the only supported format is `json`.
72 |
# File 'lib/openai/models/audio/transcription_create_params.rb', line 72 optional :response_format, enum: -> { OpenAI::AudioResponseFormat } |
#temperature ⇒ Float?
The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.
82 |
# File 'lib/openai/models/audio/transcription_create_params.rb', line 82 optional :temperature, Float |
#timestamp_granularities ⇒ Array<Symbol, OpenAI::Models::Audio::TranscriptionCreateParams::TimestampGranularity>?
The timestamp granularities to populate for this transcription. ‘response_format` must be set `verbose_json` to use timestamp granularities. Either or both of these options are supported: `word`, or `segment`. Note: There is no additional latency for segment timestamps, but generating word timestamps incurs additional latency.
92 93 94 95 |
# File 'lib/openai/models/audio/transcription_create_params.rb', line 92 optional :timestamp_granularities, -> { OpenAI::Internal::Type::ArrayOf[enum: OpenAI::Audio::TranscriptionCreateParams::TimestampGranularity] } |
Class Method Details
.values ⇒ Array<Symbol>
|
# File 'lib/openai/models/audio/transcription_create_params.rb', line 201
|
.variants ⇒ Array(Symbol, :auto, OpenAI::Models::Audio::TranscriptionCreateParams::ChunkingStrategy::VadConfig)
|
# File 'lib/openai/models/audio/transcription_create_params.rb', line 132
|