Class: Google::Apis::TexttospeechV1::SynthesisInput
- Inherits:
-
Object
- Object
- Google::Apis::TexttospeechV1::SynthesisInput
- 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
Contains text input to be synthesized. Either text or ssml must be
supplied. Supplying both or neither returns google.rpc.Code.INVALID_ARGUMENT.
The input size is limited to 5000 bytes.
Instance Attribute Summary collapse
-
#custom_pronunciations ⇒ Google::Apis::TexttospeechV1::CustomPronunciations
A collection of pronunciation customizations.
-
#markup ⇒ String
Markup for Chirp 3: HD voices specifically.
-
#multi_speaker_markup ⇒ Google::Apis::TexttospeechV1::MultiSpeakerMarkup
A collection of turns for multi-speaker synthesis.
-
#prompt ⇒ String
This system instruction is supported only for controllable/promptable voice models.
-
#ssml ⇒ String
The SSML document to be synthesized.
-
#text ⇒ String
The raw text to be synthesized.
Instance Method Summary collapse
-
#initialize(**args) ⇒ SynthesisInput
constructor
A new instance of SynthesisInput.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ SynthesisInput
Returns a new instance of SynthesisInput.
528 529 530 |
# File 'lib/google/apis/texttospeech_v1/classes.rb', line 528 def initialize(**args) update!(**args) end |
Instance Attribute Details
#custom_pronunciations ⇒ Google::Apis::TexttospeechV1::CustomPronunciations
A collection of pronunciation customizations.
Corresponds to the JSON property customPronunciations
494 495 496 |
# File 'lib/google/apis/texttospeech_v1/classes.rb', line 494 def custom_pronunciations @custom_pronunciations end |
#markup ⇒ String
Markup for Chirp 3: HD voices specifically. This field may not be used with
any other voices.
Corresponds to the JSON property markup
500 501 502 |
# File 'lib/google/apis/texttospeech_v1/classes.rb', line 500 def markup @markup end |
#multi_speaker_markup ⇒ Google::Apis::TexttospeechV1::MultiSpeakerMarkup
A collection of turns for multi-speaker synthesis.
Corresponds to the JSON property multiSpeakerMarkup
505 506 507 |
# File 'lib/google/apis/texttospeech_v1/classes.rb', line 505 def multi_speaker_markup @multi_speaker_markup end |
#prompt ⇒ String
This system instruction is supported only for controllable/promptable voice
models. If this system instruction is used, we pass the unedited text to
Gemini-TTS. Otherwise, a default system instruction is used. AI Studio calls
this system instruction, Style Instructions.
Corresponds to the JSON property prompt
513 514 515 |
# File 'lib/google/apis/texttospeech_v1/classes.rb', line 513 def prompt @prompt end |
#ssml ⇒ String
The SSML document to be synthesized. The SSML document must be valid and well-
formed. Otherwise the RPC will fail and return google.rpc.Code.
INVALID_ARGUMENT. For more information, see SSML.
Corresponds to the JSON property ssml
521 522 523 |
# File 'lib/google/apis/texttospeech_v1/classes.rb', line 521 def ssml @ssml end |
#text ⇒ String
The raw text to be synthesized.
Corresponds to the JSON property text
526 527 528 |
# File 'lib/google/apis/texttospeech_v1/classes.rb', line 526 def text @text end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
533 534 535 536 537 538 539 540 |
# File 'lib/google/apis/texttospeech_v1/classes.rb', line 533 def update!(**args) @custom_pronunciations = args[:custom_pronunciations] if args.key?(:custom_pronunciations) @markup = args[:markup] if args.key?(:markup) @multi_speaker_markup = args[:multi_speaker_markup] if args.key?(:multi_speaker_markup) @prompt = args[:prompt] if args.key?(:prompt) @ssml = args[:ssml] if args.key?(:ssml) @text = args[:text] if args.key?(:text) end |