Class: Google::Apis::TexttospeechV1::Voice

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Voice

Returns a new instance of Voice



218
219
220
# File 'generated/google/apis/texttospeech_v1/classes.rb', line 218

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

Instance Attribute Details

#language_codesArray<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

Returns:

  • (Array<String>)


201
202
203
# File 'generated/google/apis/texttospeech_v1/classes.rb', line 201

def language_codes
  @language_codes
end

#nameString

The name of this voice. Each distinct voice has a unique name. Corresponds to the JSON property name

Returns:

  • (String)


206
207
208
# File 'generated/google/apis/texttospeech_v1/classes.rb', line 206

def name
  @name
end

#natural_sample_rate_hertzFixnum

The natural sample rate (in hertz) for this voice. Corresponds to the JSON property naturalSampleRateHertz

Returns:

  • (Fixnum)


211
212
213
# File 'generated/google/apis/texttospeech_v1/classes.rb', line 211

def natural_sample_rate_hertz
  @natural_sample_rate_hertz
end

#ssml_genderString

The gender of this voice. Corresponds to the JSON property ssmlGender

Returns:

  • (String)


216
217
218
# File 'generated/google/apis/texttospeech_v1/classes.rb', line 216

def ssml_gender
  @ssml_gender
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



223
224
225
226
227
228
# File 'generated/google/apis/texttospeech_v1/classes.rb', line 223

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