Class: Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1WordInfo
- Inherits:
-
Object
- Object
- Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1WordInfo
- 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
-
#end_offset ⇒ String
End offset in time of the word relative to the start of the audio.
-
#speaker ⇒ String
Optional.
-
#start_offset ⇒ String
Start offset in time of the word relative to the start of the audio.
-
#text ⇒ String
The transcribed word.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GenaiVertexV1beta1WordInfo
constructor
A new instance of GenaiVertexV1beta1WordInfo.
-
#update!(**args) ⇒ Object
Update properties of this object.
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_offset ⇒ String
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
6706 6707 6708 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 6706 def end_offset @end_offset end |
#speaker ⇒ String
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
6712 6713 6714 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 6712 def speaker @speaker end |
#start_offset ⇒ String
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
6718 6719 6720 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 6718 def start_offset @start_offset end |
#text ⇒ String
The transcribed word.
Corresponds to the JSON property text
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 |