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.
166 167 168 169 170 171 172 173 |
# File 'lib/typecast/models.rb', line 166 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.
153 154 155 |
# File 'lib/typecast/models.rb', line 153 def age @age end |
#gender ⇒ Object (readonly)
Returns the value of attribute gender.
153 154 155 |
# File 'lib/typecast/models.rb', line 153 def gender @gender end |
#models ⇒ Object (readonly)
Returns the value of attribute models.
153 154 155 |
# File 'lib/typecast/models.rb', line 153 def models @models end |
#use_cases ⇒ Object (readonly)
Returns the value of attribute use_cases.
153 154 155 |
# File 'lib/typecast/models.rb', line 153 def use_cases @use_cases end |
#voice_id ⇒ Object (readonly)
Returns the value of attribute voice_id.
153 154 155 |
# File 'lib/typecast/models.rb', line 153 def voice_id @voice_id end |
#voice_name ⇒ Object (readonly)
Returns the value of attribute voice_name.
153 154 155 |
# File 'lib/typecast/models.rb', line 153 def voice_name @voice_name end |
Class Method Details
.from_h(hash) ⇒ Object
155 156 157 158 159 160 161 162 163 164 |
# File 'lib/typecast/models.rb', line 155 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 |