Class: Azure::TTS::Voice

Inherits:
Object
  • Object
show all
Defined in:
lib/azure/tts/voices.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#genderObject (readonly)

Returns the value of attribute gender.



29
30
31
# File 'lib/azure/tts/voices.rb', line 29

def gender
  @gender
end

#localeObject (readonly)

Returns the value of attribute locale.



29
30
31
# File 'lib/azure/tts/voices.rb', line 29

def locale
  @locale
end

#nameObject (readonly)

Returns the value of attribute name.



29
30
31
# File 'lib/azure/tts/voices.rb', line 29

def name
  @name
end

#short_nameObject (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

Returns:



38
39
40
# File 'lib/azure/tts/voices.rb', line 38

def neural?
  name =~ /Neural/
end