Class: Typecast::Models::TTSRequest
- Inherits:
-
Object
- Object
- Typecast::Models::TTSRequest
- Defined in:
- lib/typecast/models.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#language ⇒ Object
readonly
Returns the value of attribute language.
-
#model ⇒ Object
readonly
Returns the value of attribute model.
-
#output ⇒ Object
readonly
Returns the value of attribute output.
-
#prompt ⇒ Object
readonly
Returns the value of attribute prompt.
-
#seed ⇒ Object
readonly
Returns the value of attribute seed.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
-
#voice_id ⇒ Object
readonly
Returns the value of attribute voice_id.
Instance Method Summary collapse
-
#initialize(voice_id:, text:, model:, language: nil, prompt: nil, output: nil, seed: nil) ⇒ TTSRequest
constructor
A new instance of TTSRequest.
- #to_h ⇒ Object
Constructor Details
#initialize(voice_id:, text:, model:, language: nil, prompt: nil, output: nil, seed: nil) ⇒ TTSRequest
Returns a new instance of TTSRequest.
93 94 95 96 97 98 99 100 101 |
# File 'lib/typecast/models.rb', line 93 def initialize(voice_id:, text:, model:, language: nil, prompt: nil, output: nil, seed: nil) @voice_id = voice_id @text = text @model = model @language = language @prompt = prompt @output = output @seed = seed end |
Instance Attribute Details
#language ⇒ Object (readonly)
Returns the value of attribute language.
91 92 93 |
# File 'lib/typecast/models.rb', line 91 def language @language end |
#model ⇒ Object (readonly)
Returns the value of attribute model.
91 92 93 |
# File 'lib/typecast/models.rb', line 91 def model @model end |
#output ⇒ Object (readonly)
Returns the value of attribute output.
91 92 93 |
# File 'lib/typecast/models.rb', line 91 def output @output end |
#prompt ⇒ Object (readonly)
Returns the value of attribute prompt.
91 92 93 |
# File 'lib/typecast/models.rb', line 91 def prompt @prompt end |
#seed ⇒ Object (readonly)
Returns the value of attribute seed.
91 92 93 |
# File 'lib/typecast/models.rb', line 91 def seed @seed end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
91 92 93 |
# File 'lib/typecast/models.rb', line 91 def text @text end |
#voice_id ⇒ Object (readonly)
Returns the value of attribute voice_id.
91 92 93 |
# File 'lib/typecast/models.rb', line 91 def voice_id @voice_id end |
Instance Method Details
#to_h ⇒ Object
103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/typecast/models.rb', line 103 def to_h Models.compact( voice_id: voice_id, text: text, model: model, language: language, prompt: Models.value_to_h(prompt), output: Models.value_to_h(output), seed: seed ) end |