Class: Google::Apis::TexttospeechV1::MultispeakerPrebuiltVoice

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/texttospeech_v1/classes.rb,
lib/google/apis/texttospeech_v1/representations.rb,
lib/google/apis/texttospeech_v1/representations.rb

Overview

Configuration for a single speaker in a Gemini TTS multi-speaker setup. Enables dialogue between two speakers.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ MultispeakerPrebuiltVoice

Returns a new instance of MultispeakerPrebuiltVoice.



373
374
375
# File 'lib/google/apis/texttospeech_v1/classes.rb', line 373

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

Instance Attribute Details

#speaker_aliasString

Required. The speaker alias of the voice. This is the user-chosen speaker name that is used in the multispeaker text input, such as "Speaker1". Corresponds to the JSON property speakerAlias

Returns:

  • (String)


365
366
367
# File 'lib/google/apis/texttospeech_v1/classes.rb', line 365

def speaker_alias
  @speaker_alias
end

#speaker_idString

Required. The speaker ID of the voice. See https://cloud.google.com/text-to- speech/docs/gemini-tts#voice_options for available values. Corresponds to the JSON property speakerId

Returns:

  • (String)


371
372
373
# File 'lib/google/apis/texttospeech_v1/classes.rb', line 371

def speaker_id
  @speaker_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



378
379
380
381
# File 'lib/google/apis/texttospeech_v1/classes.rb', line 378

def update!(**args)
  @speaker_alias = args[:speaker_alias] if args.key?(:speaker_alias)
  @speaker_id = args[:speaker_id] if args.key?(:speaker_id)
end