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.



263
264
265
266
267
268
269
270
271
272
# File 'lib/cohere/transcribe/types.rb', line 263

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



255
256
257
# File 'lib/cohere/transcribe/types.rb', line 255

def end
  @end
end

#segment_indexObject (readonly)

Returns the value of attribute segment_index

Returns:

  • (Object)

    the current value of segment_index



255
256
257
# File 'lib/cohere/transcribe/types.rb', line 255

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



255
256
257
# File 'lib/cohere/transcribe/types.rb', line 255

def segment_word_index
  @segment_word_index
end

#startObject (readonly)

Returns the value of attribute start

Returns:

  • (Object)

    the current value of start



255
256
257
# File 'lib/cohere/transcribe/types.rb', line 255

def start
  @start
end

#textObject (readonly)

Returns the value of attribute text

Returns:

  • (Object)

    the current value of text



255
256
257
# File 'lib/cohere/transcribe/types.rb', line 255

def text
  @text
end

#timing_sourceObject (readonly)

Returns the value of attribute timing_source

Returns:

  • (Object)

    the current value of timing_source



255
256
257
# File 'lib/cohere/transcribe/types.rb', line 255

def timing_source
  @timing_source
end

Class Method Details

.newObject



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

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