Class: Blastr::TTS::TTSImplementation
- Inherits:
-
Object
- Object
- Blastr::TTS::TTSImplementation
- Defined in:
- lib/tts/tts.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #available? ⇒ Boolean
- #binary ⇒ Object
-
#initialize(name) ⇒ TTSImplementation
constructor
A new instance of TTSImplementation.
- #speak(msg) ⇒ Object
Constructor Details
#initialize(name) ⇒ TTSImplementation
Returns a new instance of TTSImplementation.
8 9 10 |
# File 'lib/tts/tts.rb', line 8 def initialize(name) @name = name end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/tts/tts.rb', line 6 def name @name end |
Instance Method Details
#available? ⇒ Boolean
16 17 18 |
# File 'lib/tts/tts.rb', line 16 def available? binary.empty? == false end |
#binary ⇒ Object
12 13 14 |
# File 'lib/tts/tts.rb', line 12 def binary %x[#{locate_which_binary} #{@name}].strip end |
#speak(msg) ⇒ Object
20 21 22 |
# File 'lib/tts/tts.rb', line 20 def speak(msg) %x[#{binary} "#{msg}"] end |