Class: Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1WordInfo

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/aiplatform_v1beta1/classes.rb,
lib/google/apis/aiplatform_v1beta1/representations.rb,
lib/google/apis/aiplatform_v1beta1/representations.rb

Overview

Word-level ASR annotation for transcription output. Carries the word text, optional timing, and optional speaker attribution.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GenaiVertexV1beta1WordInfo

Returns a new instance of GenaiVertexV1beta1WordInfo.



6725
6726
6727
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 6725

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#end_offsetString

End offset in time of the word relative to the start of the audio. Present when timestamp_granularities contains "word". Corresponds to the JSON property endOffset

Returns:

  • (String)


6706
6707
6708
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 6706

def end_offset
  @end_offset
end

#speakerString

Optional. Speaker label for this word (e.g. "spk_1", "spk_2"). Present when diarization_mode is set in TranscriptionConfig. Corresponds to the JSON property speaker

Returns:

  • (String)


6712
6713
6714
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 6712

def speaker
  @speaker
end

#start_offsetString

Start offset in time of the word relative to the start of the audio. Present when timestamp_granularities contains "word". Corresponds to the JSON property startOffset

Returns:

  • (String)


6718
6719
6720
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 6718

def start_offset
  @start_offset
end

#textString

The transcribed word. Corresponds to the JSON property text

Returns:

  • (String)


6723
6724
6725
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 6723

def text
  @text
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6730
6731
6732
6733
6734
6735
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 6730

def update!(**args)
  @end_offset = args[:end_offset] if args.key?(:end_offset)
  @speaker = args[:speaker] if args.key?(:speaker)
  @start_offset = args[:start_offset] if args.key?(:start_offset)
  @text = args[:text] if args.key?(:text)
end