Class: Typecast::Models::VoiceV2
- Inherits:
-
Object
- Object
- Typecast::Models::VoiceV2
- 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.
-
#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.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(voice_id:, voice_name:, models:, gender: nil, age: nil, use_cases: []) ⇒ VoiceV2
constructor
A new instance of VoiceV2.
Constructor Details
#initialize(voice_id:, voice_name:, models:, gender: nil, age: nil, use_cases: []) ⇒ VoiceV2
Returns a new instance of VoiceV2.
165 166 167 168 169 170 171 172 |
# File 'lib/typecast/models.rb', line 165 def initialize(voice_id:, voice_name:, models:, gender: nil, age: nil, use_cases: []) @voice_id = voice_id @voice_name = voice_name @models = models @gender = gender @age = age @use_cases = use_cases end |
Instance Attribute Details
#age ⇒ Object (readonly)
Returns the value of attribute age.
152 153 154 |
# File 'lib/typecast/models.rb', line 152 def age @age end |
#gender ⇒ Object (readonly)
Returns the value of attribute gender.
152 153 154 |
# File 'lib/typecast/models.rb', line 152 def gender @gender end |
#models ⇒ Object (readonly)
Returns the value of attribute models.
152 153 154 |
# File 'lib/typecast/models.rb', line 152 def models @models end |
#use_cases ⇒ Object (readonly)
Returns the value of attribute use_cases.
152 153 154 |
# File 'lib/typecast/models.rb', line 152 def use_cases @use_cases end |
#voice_id ⇒ Object (readonly)
Returns the value of attribute voice_id.
152 153 154 |
# File 'lib/typecast/models.rb', line 152 def voice_id @voice_id end |
#voice_name ⇒ Object (readonly)
Returns the value of attribute voice_name.
152 153 154 |
# File 'lib/typecast/models.rb', line 152 def voice_name @voice_name end |
Class Method Details
.from_h(hash) ⇒ Object
154 155 156 157 158 159 160 161 162 163 |
# File 'lib/typecast/models.rb', line 154 def self.from_h(hash) new( voice_id: hash.fetch("voice_id", ""), voice_name: hash.fetch("voice_name", ""), models: hash.fetch("models", []), gender: hash["gender"], age: hash["age"], use_cases: hash.fetch("use_cases", []) ) end |