Class: Typecast::Models::CustomVoice
- Inherits:
-
Object
- Object
- Typecast::Models::CustomVoice
- Defined in:
- lib/typecast/models.rb
Instance Attribute Summary collapse
-
#model ⇒ Object
readonly
Returns the value of attribute model.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#voice_id ⇒ Object
readonly
Returns the value of attribute voice_id.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(voice_id:, name:, model: nil) ⇒ CustomVoice
constructor
A new instance of CustomVoice.
Constructor Details
#initialize(voice_id:, name:, model: nil) ⇒ CustomVoice
Returns a new instance of CustomVoice.
197 198 199 200 201 |
# File 'lib/typecast/models.rb', line 197 def initialize(voice_id:, name:, model: nil) @voice_id = voice_id @name = name @model = model end |
Instance Attribute Details
#model ⇒ Object (readonly)
Returns the value of attribute model.
191 192 193 |
# File 'lib/typecast/models.rb', line 191 def model @model end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
191 192 193 |
# File 'lib/typecast/models.rb', line 191 def name @name end |
#voice_id ⇒ Object (readonly)
Returns the value of attribute voice_id.
191 192 193 |
# File 'lib/typecast/models.rb', line 191 def voice_id @voice_id end |
Class Method Details
.from_h(hash) ⇒ Object
193 194 195 |
# File 'lib/typecast/models.rb', line 193 def self.from_h(hash) new(voice_id: hash.fetch("voice_id", ""), name: hash.fetch("name", ""), model: hash["model"]) end |