Class: Cohere::Transcribe::TranscriptionWord

Inherits:
Data
  • Object
show all
Defined in:
lib/cohere/transcribe/types.rb,
sig/cohere/transcribe.rbs

Overview

One word with either CTC or approximate timing.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(start:, end:, text:, segment_index:, segment_word_index:, timing_source:) ⇒ TranscriptionWord

Returns a new instance of TranscriptionWord.



249
250
251
252
253
254
255
256
257
258
# File 'lib/cohere/transcribe/types.rb', line 249

def initialize(start:, end:, text:, segment_index:, segment_word_index:, timing_source:)
  super(
    start: start,
    end: binding.local_variable_get(:end),
    text: TypesSupport.immutable(text),
    segment_index: segment_index,
    segment_word_index: segment_word_index,
    timing_source: TypesSupport.immutable(timing_source)
  )
end

Instance Attribute Details

#endObject (readonly)

Returns the value of attribute end

Returns:

  • (Object)

    the current value of end



241
242
243
# File 'lib/cohere/transcribe/types.rb', line 241

def end
  @end
end

#segment_indexObject (readonly)

Returns the value of attribute segment_index

Returns:

  • (Object)

    the current value of segment_index



241
242
243
# File 'lib/cohere/transcribe/types.rb', line 241

def segment_index
  @segment_index
end

#segment_word_indexObject (readonly)

Returns the value of attribute segment_word_index

Returns:

  • (Object)

    the current value of segment_word_index



241
242
243
# File 'lib/cohere/transcribe/types.rb', line 241

def segment_word_index
  @segment_word_index
end

#startObject (readonly)

Returns the value of attribute start

Returns:

  • (Object)

    the current value of start



241
242
243
# File 'lib/cohere/transcribe/types.rb', line 241

def start
  @start
end

#textObject (readonly)

Returns the value of attribute text

Returns:

  • (Object)

    the current value of text



241
242
243
# File 'lib/cohere/transcribe/types.rb', line 241

def text
  @text
end

#timing_sourceObject (readonly)

Returns the value of attribute timing_source

Returns:

  • (Object)

    the current value of timing_source



241
242
243
# File 'lib/cohere/transcribe/types.rb', line 241

def timing_source
  @timing_source
end

Class Method Details

.newObject



110
# File 'sig/cohere/transcribe.rbs', line 110

def self.new: (start: Float, end: Float, text: String, segment_index: Integer,