Class: Typecast::Models::VoiceV3
- Inherits:
-
Object
- Object
- Typecast::Models::VoiceV3
- Defined in:
- lib/typecast/models.rb
Instance Attribute Summary collapse
-
#age ⇒ Object
readonly
Returns the value of attribute age.
-
#gender ⇒ Object
readonly
Returns the value of attribute gender.
-
#models ⇒ Object
readonly
Returns the value of attribute models.
-
#preview_url ⇒ Object
readonly
Returns the value of attribute preview_url.
-
#use_cases ⇒ Object
readonly
Returns the value of attribute use_cases.
-
#voice_id ⇒ Object
readonly
Returns the value of attribute voice_id.
-
#voice_name ⇒ Object
readonly
Returns the value of attribute voice_name.
-
#voice_type ⇒ Object
readonly
Returns the value of attribute voice_type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(voice_id:, voice_name:, models:, voice_type:, gender: nil, age: nil, use_cases: [], preview_url: nil) ⇒ VoiceV3
constructor
A new instance of VoiceV3.
Constructor Details
#initialize(voice_id:, voice_name:, models:, voice_type:, gender: nil, age: nil, use_cases: [], preview_url: nil) ⇒ VoiceV3
Returns a new instance of VoiceV3.
187 188 189 190 |
# File 'lib/typecast/models.rb', line 187 def initialize(voice_id:, voice_name:, models:, voice_type:, gender: nil, age: nil, use_cases: [], preview_url: nil) @voice_id, @voice_name, @models, @voice_type = voice_id, voice_name, models, voice_type @gender, @age, @use_cases, @preview_url = gender, age, use_cases, preview_url end |
Instance Attribute Details
#age ⇒ Object (readonly)
Returns the value of attribute age.
183 184 185 |
# File 'lib/typecast/models.rb', line 183 def age @age end |
#gender ⇒ Object (readonly)
Returns the value of attribute gender.
183 184 185 |
# File 'lib/typecast/models.rb', line 183 def gender @gender end |
#models ⇒ Object (readonly)
Returns the value of attribute models.
183 184 185 |
# File 'lib/typecast/models.rb', line 183 def models @models end |
#preview_url ⇒ Object (readonly)
Returns the value of attribute preview_url.
183 184 185 |
# File 'lib/typecast/models.rb', line 183 def preview_url @preview_url end |
#use_cases ⇒ Object (readonly)
Returns the value of attribute use_cases.
183 184 185 |
# File 'lib/typecast/models.rb', line 183 def use_cases @use_cases end |
#voice_id ⇒ Object (readonly)
Returns the value of attribute voice_id.
183 184 185 |
# File 'lib/typecast/models.rb', line 183 def voice_id @voice_id end |
#voice_name ⇒ Object (readonly)
Returns the value of attribute voice_name.
183 184 185 |
# File 'lib/typecast/models.rb', line 183 def voice_name @voice_name end |
#voice_type ⇒ Object (readonly)
Returns the value of attribute voice_type.
183 184 185 |
# File 'lib/typecast/models.rb', line 183 def voice_type @voice_type end |
Class Method Details
.from_h(hash) ⇒ Object
184 185 186 |
# File 'lib/typecast/models.rb', line 184 def self.from_h(hash) new(voice_id: hash.fetch("voice_id", ""), voice_name: hash.fetch("voice_name", { "eng" => "", "kor" => "" }), models: hash.fetch("models", []), voice_type: hash.fetch("voice_type", ""), gender: hash["gender"], age: hash["age"], use_cases: hash.fetch("use_cases", []), preview_url: hash["preview_url"]) end |