Class: Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1AudioTranscription

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



173
174
175
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 173

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)


160
161
162
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 160

def speaker_label
  @speaker_label
end

#textString

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

Returns:

  • (String)


165
166
167
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 165

def text
  @text
end

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

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



171
172
173
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 171

def words
  @words
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



178
179
180
181
182
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 178

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