Class: Dictation::TTS
- Inherits:
-
Object
- Object
- Dictation::TTS
- Defined in:
- lib/dictation/tts.rb
Instance Method Summary collapse
-
#initialize(language, voice = nil) ⇒ TTS
constructor
A new instance of TTS.
- #speak(text) ⇒ Object
Constructor Details
#initialize(language, voice = nil) ⇒ TTS
Returns a new instance of TTS.
3 4 5 |
# File 'lib/dictation/tts.rb', line 3 def initialize(language, voice = nil) set_language_and_voice(language, voice) end |
Instance Method Details
#speak(text) ⇒ Object
40 41 42 |
# File 'lib/dictation/tts.rb', line 40 def speak(text) system("say -v #{@voice} #{text} > /dev/null 2>&1") end |