Class: OpenAI::Models::Audio::TranscriptionDiarized

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/audio/transcription_diarized.rb

Defined Under Namespace

Modules: Usage

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(duration:, segments:, text:, usage: nil, task: :transcribe) ⇒ Object

Represents a diarized transcription response returned by the model, including the combined transcript and speaker-segment annotations.

Parameters:



# File 'lib/openai/models/audio/transcription_diarized.rb', line 37

Instance Attribute Details

#durationFloat

Duration of the input audio in seconds.

Returns:

  • (Float)


11
# File 'lib/openai/models/audio/transcription_diarized.rb', line 11

required :duration, Float

#segmentsArray<OpenAI::Models::Audio::TranscriptionDiarizedSegment>

Segments of the transcript annotated with timestamps and speaker labels.



17
# File 'lib/openai/models/audio/transcription_diarized.rb', line 17

required :segments, -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Audio::TranscriptionDiarizedSegment] }

#taskSymbol, :transcribe

The type of task that was run. Always ‘transcribe`.

Returns:

  • (Symbol, :transcribe)


23
# File 'lib/openai/models/audio/transcription_diarized.rb', line 23

required :task, const: :transcribe

#textString

The concatenated transcript text for the entire audio input.

Returns:

  • (String)


29
# File 'lib/openai/models/audio/transcription_diarized.rb', line 29

required :text, String

#usageOpenAI::Models::Audio::TranscriptionDiarized::Usage::Tokens, ...

Token or duration usage statistics for the request.



35
# File 'lib/openai/models/audio/transcription_diarized.rb', line 35

optional :usage, union: -> { OpenAI::Audio::TranscriptionDiarized::Usage }