Class: Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1AudioTranscription

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

The transcription of an audio part. For multi-speaker audio, each speaker segment is a separate Part with its own AudioTranscription carrying the speaker_label.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1AudioTranscription

Returns a new instance of GoogleCloudAiplatformV1beta1AudioTranscription.



9135
9136
9137
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 9135

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

Instance Attribute Details

#speaker_labelString

Optional. A label identifying the speaker of this audio segment (e.g. "spk_1", "spk_2"). Present when diarization is set. Corresponds to the JSON property speakerLabel

Returns:

  • (String)


9122
9123
9124
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 9122

def speaker_label
  @speaker_label
end

#textString

Required. The transcription text of this audio segment. Corresponds to the JSON property text

Returns:

  • (String)


9127
9128
9129
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 9127

def text
  @text
end

#wordsArray<Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1AudioTranscriptionWordInfo>

Optional. Detailed word-level transcriptions and timing details. Present when word_timestamp is set. Corresponds to the JSON property words



9133
9134
9135
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 9133

def words
  @words
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



9140
9141
9142
9143
9144
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 9140

def update!(**args)
  @speaker_label = args[:speaker_label] if args.key?(:speaker_label)
  @text = args[:text] if args.key?(:text)
  @words = args[:words] if args.key?(:words)
end