Class: OpenAI::Models::Audio::TranscriptionTextSegmentEvent

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

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(id:, end_:, speaker:, start:, text:, type: :"transcript.text.segment") ⇒ Object

Emitted when a diarized transcription returns a completed segment with speaker information. Only emitted when you create a transcription with stream set to true and response_format set to diarized_json.

Parameters:

  • id (String)

    Unique identifier for the segment.

  • end_ (Float)

    End timestamp of the segment in seconds.

  • speaker (String)

    Speaker label for this segment.

  • start (Float)

    Start timestamp of the segment in seconds.

  • text (String)

    Transcript text for this segment.

  • type (Symbol, :"transcript.text.segment") (defaults to: :"transcript.text.segment")

    The type of the event. Always transcript.text.segment.



# File 'lib/openai/models/audio/transcription_text_segment_event.rb', line 43

Instance Attribute Details

#end_Float

End timestamp of the segment in seconds.

Parameters:

  • value (Float)

Returns:

  • (Float)


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

required :end_, Float, api_name: :end

#idString

Unique identifier for the segment.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :id, String

#speakerString

Speaker label for this segment.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :speaker, String

#startFloat

Start timestamp of the segment in seconds.

Parameters:

  • value (Float)

Returns:

  • (Float)


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

required :start, Float

#textString

Transcript text for this segment.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :text, String

#typeSymbol, :"transcript.text.segment"

The type of the event. Always transcript.text.segment.

Parameters:

  • value (:"transcript.text.segment")

Returns:

  • (Symbol, :"transcript.text.segment")


41
# File 'lib/openai/models/audio/transcription_text_segment_event.rb', line 41

required :type, const: :"transcript.text.segment"

Instance Method Details

#to_hash{

Returns:

  • ({)


36
# File 'sig/openai/models/audio/transcription_text_segment_event.rbs', line 36

def to_hash: -> {