Class: OpenAI::Models::Audio::TranscriptionVerbose

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

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, 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: , language: , text: , segments: nil, words: nil) ⇒ Object

Represents a verbose json transcription response returned by model, based on the provided input.

Parameters:

  • duration (Float) (defaults to: )

    The duration of the input audio.

  • language (String) (defaults to: )

    The language of the input audio.

  • text (String) (defaults to: )

    The transcribed text.

  • segments (Array<OpenAI::Models::Audio::TranscriptionSegment>) (defaults to: nil)

    Segments of the transcribed text and their corresponding details.

  • words (Array<OpenAI::Models::Audio::TranscriptionWord>) (defaults to: nil)

    Extracted words and their corresponding timestamps.



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

Instance Attribute Details

#durationFloat

The duration of the input audio.

Returns:

  • (Float)


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

required :duration, Float

#languageString

The language of the input audio.

Returns:

  • (String)


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

required :language, String

#segmentsArray<OpenAI::Models::Audio::TranscriptionSegment>?

Segments of the transcribed text and their corresponding details.



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

optional :segments, -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Audio::TranscriptionSegment] }

#textString

The transcribed text.

Returns:

  • (String)


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

required :text, String

#wordsArray<OpenAI::Models::Audio::TranscriptionWord>?

Extracted words and their corresponding timestamps.



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

optional :words, -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Audio::TranscriptionWord] }