Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1AudioTranscription

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/aiplatform_v1/classes.rb,
lib/google/apis/aiplatform_v1/representations.rb,
lib/google/apis/aiplatform_v1/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) ⇒ GoogleCloudAiplatformV1AudioTranscription

Returns a new instance of GoogleCloudAiplatformV1AudioTranscription.



2372
2373
2374
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2372

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)


2359
2360
2361
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2359

def speaker_label
  @speaker_label
end

#textString

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

Returns:

  • (String)


2364
2365
2366
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2364

def text
  @text
end

#wordsArray<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1AudioTranscriptionWordInfo>

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



2370
2371
2372
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2370

def words
  @words
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2377
2378
2379
2380
2381
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 2377

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