Class: Lara::Models::AudioTextSegment

Inherits:
Base
  • Object
show all
Defined in:
lib/lara/models/audio.rb

Overview

Audio text segment for transcript results

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

parse_time

Constructor Details

#initialize(id: nil, start: nil, end_time: nil, text: nil, translation: nil, **kwargs) ⇒ AudioTextSegment

Returns a new instance of AudioTextSegment.



63
64
65
66
67
68
69
70
# File 'lib/lara/models/audio.rb', line 63

def initialize(id: nil, start: nil, end_time: nil, text: nil, translation: nil, **kwargs)
  super()
  @id = id
  @start = start
  @end = end_time.nil? ? (kwargs[:end] || kwargs["end"]) : end_time
  @text = text
  @translation = translation
end

Instance Attribute Details

#endObject (readonly)

JSON field is "end"; expose as #end to match the wire contract / other SDKs.



61
62
63
# File 'lib/lara/models/audio.rb', line 61

def end
  @end
end

#idObject (readonly)

Returns the value of attribute id.



58
59
60
# File 'lib/lara/models/audio.rb', line 58

def id
  @id
end

#startObject (readonly)

Returns the value of attribute start.



58
59
60
# File 'lib/lara/models/audio.rb', line 58

def start
  @start
end

#textObject (readonly)

Returns the value of attribute text.



58
59
60
# File 'lib/lara/models/audio.rb', line 58

def text
  @text
end

#translationObject (readonly)

Returns the value of attribute translation.



58
59
60
# File 'lib/lara/models/audio.rb', line 58

def translation
  @translation
end