Class: Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1TranscriptionConfig

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

Configuration for speech recognition (transcription).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GenaiVertexV1beta1TranscriptionConfig

Returns a new instance of GenaiVertexV1beta1TranscriptionConfig.



6334
6335
6336
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 6334

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

Instance Attribute Details

#adaptation_phrasesArray<String>

Optional. A list of phrases to bias the ASR model towards. Corresponds to the JSON property adaptationPhrases

Returns:

  • (Array<String>)


6309
6310
6311
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 6309

def adaptation_phrases
  @adaptation_phrases
end

#custom_vocabularyArray<String>

Optional. A list of custom vocabulary phrases to bias the speech recognition model toward recognizing specific terms. Corresponds to the JSON property customVocabulary

Returns:

  • (Array<String>)


6315
6316
6317
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 6315

def custom_vocabulary
  @custom_vocabulary
end

#diarization_modeString

Optional. Configures speaker diarization. Supported values: "speaker". Corresponds to the JSON property diarizationMode

Returns:

  • (String)


6320
6321
6322
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 6320

def diarization_mode
  @diarization_mode
end

#language_codesArray<String>

Optional. BCP-47 language codes providing hints about the languages present in the audio. If omitted or empty, defaults to automatic language detection. Corresponds to the JSON property languageCodes

Returns:

  • (Array<String>)


6326
6327
6328
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 6326

def language_codes
  @language_codes
end

#timestamp_granularitiesArray<String>

Optional. The granularity of timestamps to include in the transcription output. Supported values: "word". If empty, no timestamps are generated. Corresponds to the JSON property timestampGranularities

Returns:

  • (Array<String>)


6332
6333
6334
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 6332

def timestamp_granularities
  @timestamp_granularities
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6339
6340
6341
6342
6343
6344
6345
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 6339

def update!(**args)
  @adaptation_phrases = args[:adaptation_phrases] if args.key?(:adaptation_phrases)
  @custom_vocabulary = args[:custom_vocabulary] if args.key?(:custom_vocabulary)
  @diarization_mode = args[:diarization_mode] if args.key?(:diarization_mode)
  @language_codes = args[:language_codes] if args.key?(:language_codes)
  @timestamp_granularities = args[:timestamp_granularities] if args.key?(:timestamp_granularities)
end