Class: CW::Voice
- Inherits:
-
Object
- Object
- CW::Voice
- Defined in:
- lib/cw/voice.rb
Overview
class Speak speaks with a voice
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Voice
constructor
A new instance of Voice.
- #say(words, rate = 300, voice = 'bruce') ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Voice
Returns a new instance of Voice.
9 10 11 |
# File 'lib/cw/voice.rb', line 9 def initialize( = {}) @options = end |
Instance Method Details
#say(words, rate = 300, voice = 'bruce') ⇒ Object
13 14 15 16 |
# File 'lib/cw/voice.rb', line 13 def say words, rate = 300, voice = 'bruce' system("say #{words} -ospoken.wave -r#{rate} -v#{voice}") system("afplay spoken.wave") end |