Class: Google::Apis::CesV1::SynthesizeSpeechConfig
- Inherits:
-
Object
- Object
- Google::Apis::CesV1::SynthesizeSpeechConfig
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/ces_v1/classes.rb,
lib/google/apis/ces_v1/representations.rb,
lib/google/apis/ces_v1/representations.rb
Overview
Configuration for how the agent response should be synthesized.
Instance Attribute Summary collapse
-
#speaking_rate ⇒ Float
Optional.
-
#voice ⇒ String
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ SynthesizeSpeechConfig
constructor
A new instance of SynthesizeSpeechConfig.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ SynthesizeSpeechConfig
Returns a new instance of SynthesizeSpeechConfig.
6218 6219 6220 |
# File 'lib/google/apis/ces_v1/classes.rb', line 6218 def initialize(**args) update!(**args) end |
Instance Attribute Details
#speaking_rate ⇒ Float
Optional. The speaking rate/speed in the range [0.25, 2.0]. 1.0 is the normal
native speed supported by the specific voice. 2.0 is twice as fast, and 0.5 is
half as fast. Values outside of the range [0.25, 2.0] will return an error.
Corresponds to the JSON property speakingRate
6208 6209 6210 |
# File 'lib/google/apis/ces_v1/classes.rb', line 6208 def speaking_rate @speaking_rate end |
#voice ⇒ String
Optional. The name of the voice. If not set, the service will choose a voice
based on the other parameters such as language_code. For the list of available
voices, please refer to Supported voices and languages from Cloud Text-to-Speech.
Corresponds to the JSON property voice
6216 6217 6218 |
# File 'lib/google/apis/ces_v1/classes.rb', line 6216 def voice @voice end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
6223 6224 6225 6226 |
# File 'lib/google/apis/ces_v1/classes.rb', line 6223 def update!(**args) @speaking_rate = args[:speaking_rate] if args.key?(:speaking_rate) @voice = args[:voice] if args.key?(:voice) end |