Class: Cohere::Transcribe::TranscriptionSegment

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

Overview

Text generated for one ASR input segment.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(index:, start:, end:, text:) ⇒ TranscriptionSegment

Returns a new instance of TranscriptionSegment.



235
236
237
# File 'lib/cohere/transcribe/types.rb', line 235

def initialize(index:, start:, end:, text:)
  super(index: index, start: start, end: binding.local_variable_get(:end), text: TypesSupport.immutable(text))
end

Instance Attribute Details

#endObject (readonly)

Returns the value of attribute end

Returns:

  • (Object)

    the current value of end



234
235
236
# File 'lib/cohere/transcribe/types.rb', line 234

def end
  @end
end

#indexObject (readonly)

Returns the value of attribute index

Returns:

  • (Object)

    the current value of index



234
235
236
# File 'lib/cohere/transcribe/types.rb', line 234

def index
  @index
end

#startObject (readonly)

Returns the value of attribute start

Returns:

  • (Object)

    the current value of start



234
235
236
# File 'lib/cohere/transcribe/types.rb', line 234

def start
  @start
end

#textObject (readonly)

Returns the value of attribute text

Returns:

  • (Object)

    the current value of text



234
235
236
# File 'lib/cohere/transcribe/types.rb', line 234

def text
  @text
end

Class Method Details

.newTranscriptionSegment

Parameters:

  • index: (Integer)
  • start: (Float)
  • end: (Float)
  • text: (String)

Returns:



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

def self.new: (index: Integer, start: Float, end: Float, text: String) -> TranscriptionSegment