Class: Azure::TTS::Voice
- Inherits:
-
Object
- Object
- Azure::TTS::Voice
- Defined in:
- lib/azure/tts/voices.rb
Instance Attribute Summary collapse
-
#gender ⇒ Object
readonly
Returns the value of attribute gender.
-
#locale ⇒ Object
readonly
Returns the value of attribute locale.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#short_name ⇒ Object
readonly
Returns the value of attribute short_name.
Instance Method Summary collapse
-
#initialize(data) ⇒ Voice
constructor
A new instance of Voice.
- #neural? ⇒ Boolean
Constructor Details
#initialize(data) ⇒ Voice
Returns a new instance of Voice.
31 32 33 34 35 36 |
# File 'lib/azure/tts/voices.rb', line 31 def initialize(data) @name = data["Name"] @short_name = data["ShortName"] @gender = data["Gender"].downcase.to_sym @locale = data["Locale"] end |
Instance Attribute Details
#gender ⇒ Object (readonly)
Returns the value of attribute gender.
29 30 31 |
# File 'lib/azure/tts/voices.rb', line 29 def gender @gender end |
#locale ⇒ Object (readonly)
Returns the value of attribute locale.
29 30 31 |
# File 'lib/azure/tts/voices.rb', line 29 def locale @locale end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
29 30 31 |
# File 'lib/azure/tts/voices.rb', line 29 def name @name end |
#short_name ⇒ Object (readonly)
Returns the value of attribute short_name.
29 30 31 |
# File 'lib/azure/tts/voices.rb', line 29 def short_name @short_name end |
Instance Method Details
#neural? ⇒ Boolean
38 39 40 |
# File 'lib/azure/tts/voices.rb', line 38 def neural? name =~ /Neural/ end |