Class: Google::Apis::TexttospeechV1beta1::SynthesisInput

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ SynthesisInput

Returns a new instance of SynthesisInput



132
133
134
# File 'generated/google/apis/texttospeech_v1beta1/classes.rb', line 132

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

Instance Attribute Details

#ssmlString

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

Returns:

  • (String)


125
126
127
# File 'generated/google/apis/texttospeech_v1beta1/classes.rb', line 125

def ssml
  @ssml
end

#textString

The raw text to be synthesized. Corresponds to the JSON property text

Returns:

  • (String)


130
131
132
# File 'generated/google/apis/texttospeech_v1beta1/classes.rb', line 130

def text
  @text
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



137
138
139
140
# File 'generated/google/apis/texttospeech_v1beta1/classes.rb', line 137

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