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.



6358
6359
6360
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 6358

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>)


6322
6323
6324
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 6322

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>)


6328
6329
6330
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 6328

def custom_vocabulary
  @custom_vocabulary
end

#diarization_modeString

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

Returns:

  • (String)


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

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>)


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

def language_codes
  @language_codes
end

#modeString

Configures transcription mode. Supported values: VERBATIM, SMART. If unspecified, defaults to VERBATIM transcription. In SMART mode, the model performs disfluency removal (eliminating filler words, repetitions, and false starts), light grammatical cleanup, automatic formatting (paragraphs, bullet points, numbered lists), and minor user edits (inline self-corrections). Timestamps (timestamp_granularities) and diarization (diarization_mode) are incompatible with mode SMART. Corresponds to the JSON property mode

Returns:

  • (String)


6350
6351
6352
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 6350

def mode
  @mode
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>)


6356
6357
6358
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 6356

def timestamp_granularities
  @timestamp_granularities
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6363
6364
6365
6366
6367
6368
6369
6370
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 6363

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)
  @mode = args[:mode] if args.key?(:mode)
  @timestamp_granularities = args[:timestamp_granularities] if args.key?(:timestamp_granularities)
end