Class: YandexSpeechApi::Voice
- Inherits:
-
Object
- Object
- YandexSpeechApi::Voice
- Defined in:
- lib/yandex_speech/voice.rb
Overview
Defined Under Namespace
Classes: VoiceNotAllowed
Instance Attribute Summary collapse
-
#name ⇒ Symbol
readonly
Possible values: :jane, :oksana, :alyss, :omazh, :zahar, :ermil.
Class Method Summary collapse
-
.list ⇒ Array<String>
List of allowed voices.
Instance Method Summary collapse
-
#initialize(voice) ⇒ Voice
constructor
A new instance of Voice.
Constructor Details
#initialize(voice) ⇒ Voice
Returns a new instance of Voice.
27 28 29 30 |
# File 'lib/yandex_speech/voice.rb', line 27 def initialize(voice) @name = voice.downcase.to_sym raise VoiceNotAllowed, voice unless voice_known? @name end |
Instance Attribute Details
#name ⇒ Symbol (readonly)
Returns possible values: :jane, :oksana, :alyss, :omazh, :zahar, :ermil.
25 26 27 |
# File 'lib/yandex_speech/voice.rb', line 25 def name @name end |
Class Method Details
.list ⇒ Array<String>
List of allowed voices
18 19 20 |
# File 'lib/yandex_speech/voice.rb', line 18 def self.list %i(jane oksana alyss omazh zahar ermil) end |