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
Browse available API voices at typecast.ai/developers/api/voices.
- #to_h ⇒ Object
Constructor Details
#initialize(voice_id:, text:, model:, language: nil, prompt: nil, output: nil, seed: nil) ⇒ TTSRequest
Browse available API voices at typecast.ai/developers/api/voices.
100 101 102 103 104 105 106 107 108 |
# File 'lib/typecast/models.rb', line 100 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.
97 98 99 |
# File 'lib/typecast/models.rb', line 97 def language @language end |
#model ⇒ Object (readonly)
Returns the value of attribute model.
97 98 99 |
# File 'lib/typecast/models.rb', line 97 def model @model end |
#output ⇒ Object (readonly)
Returns the value of attribute output.
97 98 99 |
# File 'lib/typecast/models.rb', line 97 def output @output end |
#prompt ⇒ Object (readonly)
Returns the value of attribute prompt.
97 98 99 |
# File 'lib/typecast/models.rb', line 97 def prompt @prompt end |
#seed ⇒ Object (readonly)
Returns the value of attribute seed.
97 98 99 |
# File 'lib/typecast/models.rb', line 97 def seed @seed end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
97 98 99 |
# File 'lib/typecast/models.rb', line 97 def text @text end |
#voice_id ⇒ Object (readonly)
Returns the value of attribute voice_id.
97 98 99 |
# File 'lib/typecast/models.rb', line 97 def voice_id @voice_id end |
Instance Method Details
#to_h ⇒ Object
110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/typecast/models.rb', line 110 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 |