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

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

Defined Under Namespace

Modules: Usage

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, 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, coerce_with_error, 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

Parameters:

  • duration —

    Duration of the input audio in seconds.

  • segments —

    Segments of the transcript annotated with timestamps and speaker labels.

  • text —

    The concatenated transcript text for the entire audio input.

  • usage (defaults to: nil) —

    Token or duration usage statistics for the request.

  • task (defaults to: :transcribe) —

    The type of task that was run. Always transcribe.



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

Instance Attribute Details

#duration ⇒ Float

Duration of the input audio in seconds.

Returns:

  • (Float)


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

required :duration, Float

#segments ⇒ ::Array[OpenAI::Audio::TranscriptionDiarizedSegment]

Segments of the transcript annotated with timestamps and speaker labels.

Returns:

  • (::Array[OpenAI::Audio::TranscriptionDiarizedSegment])


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

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

#task ⇒ :transcribe

The type of task that was run. Always transcribe.

Returns:

  • (:transcribe)


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

required :task, const: :transcribe

#text ⇒ String

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

#usage ⇒ OpenAI::Models::Audio::TranscriptionDiarized::usage?

Token or duration usage statistics for the request.

Returns:

  • (OpenAI::Models::Audio::TranscriptionDiarized::usage, nil)


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

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

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


52
# File 'sig/openai/models/audio/transcription_diarized.rbs', line 52

def to_hash: -> {