Class: CWG::Voice
- Inherits:
-
Object
- Object
- CWG::Voice
- Defined in:
- /Users/martyn/cw/cw_clone/lib/cw/voice.rb
Overview
class Speak speaks with a voice
Instance Method Summary (collapse)
-
- (Voice) initialize(options = {})
constructor
A new instance of Voice.
- - (Object) say(words, rate = 300, voice = 'bruce')
Constructor Details
- (Voice) initialize(options = {})
Returns a new instance of Voice
9 10 11 |
# File '/Users/martyn/cw/cw_clone/lib/cw/voice.rb', line 9 def initialize( = {}) @options = end |
Instance Method Details
- (Object) say(words, rate = 300, voice = 'bruce')
13 14 15 16 |
# File '/Users/martyn/cw/cw_clone/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 |