Class: Google::Apis::TexttospeechV1::Voice
- Inherits:
-
Object
- Object
- Google::Apis::TexttospeechV1::Voice
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/texttospeech_v1/classes.rb,
generated/google/apis/texttospeech_v1/representations.rb,
generated/google/apis/texttospeech_v1/representations.rb
Overview
Description of a voice supported by the TTS service.
Instance Attribute Summary collapse
-
#language_codes ⇒ Array<String>
The languages that this voice supports, expressed as BCP-47 language tags (e.g. "en-US", "es-419", "cmn-tw").
-
#name ⇒ String
The name of this voice.
-
#natural_sample_rate_hertz ⇒ Fixnum
The natural sample rate (in hertz) for this voice.
-
#ssml_gender ⇒ String
The gender of this voice.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Voice
constructor
A new instance of Voice.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ Voice
Returns a new instance of Voice.
231 232 233 |
# File 'generated/google/apis/texttospeech_v1/classes.rb', line 231 def initialize(**args) update!(**args) end |
Instance Attribute Details
#language_codes ⇒ Array<String>
The languages that this voice supports, expressed as
BCP-47 language tags (e.g.
"en-US", "es-419", "cmn-tw").
Corresponds to the JSON property languageCodes
214 215 216 |
# File 'generated/google/apis/texttospeech_v1/classes.rb', line 214 def language_codes @language_codes end |
#name ⇒ String
The name of this voice. Each distinct voice has a unique name.
Corresponds to the JSON property name
219 220 221 |
# File 'generated/google/apis/texttospeech_v1/classes.rb', line 219 def name @name end |
#natural_sample_rate_hertz ⇒ Fixnum
The natural sample rate (in hertz) for this voice.
Corresponds to the JSON property naturalSampleRateHertz
224 225 226 |
# File 'generated/google/apis/texttospeech_v1/classes.rb', line 224 def natural_sample_rate_hertz @natural_sample_rate_hertz end |
#ssml_gender ⇒ String
The gender of this voice.
Corresponds to the JSON property ssmlGender
229 230 231 |
# File 'generated/google/apis/texttospeech_v1/classes.rb', line 229 def ssml_gender @ssml_gender end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
236 237 238 239 240 241 |
# File 'generated/google/apis/texttospeech_v1/classes.rb', line 236 def update!(**args) @language_codes = args[:language_codes] if args.key?(:language_codes) @name = args[:name] if args.key?(:name) @natural_sample_rate_hertz = args[:natural_sample_rate_hertz] if args.key?(:natural_sample_rate_hertz) @ssml_gender = args[:ssml_gender] if args.key?(:ssml_gender) end |