Class: FSR::App::Speak
- Inherits:
-
Application
- Object
- Application
- FSR::App::Speak
- Defined in:
- lib/fsr/app/speak.rb
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
- #arguments ⇒ Object
-
#initialize(message, opts = {}) ⇒ Speak
constructor
A new instance of Speak.
- #sendmsg ⇒ Object
Methods inherited from Application
Constructor Details
#initialize(message, opts = {}) ⇒ Speak
Returns a new instance of Speak.
8 9 10 11 12 13 |
# File 'lib/fsr/app/speak.rb', line 8 def initialize(, opts = {}) # wav file you wish to play, full path @message = @voice = opts[:voice] || "slt" @engine = opts[:engine] || "flite" end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
6 7 8 |
# File 'lib/fsr/app/speak.rb', line 6 def @message end |
Instance Method Details
#arguments ⇒ Object
15 16 17 |
# File 'lib/fsr/app/speak.rb', line 15 def arguments [@engine, @voice, @message] end |
#sendmsg ⇒ Object
19 20 21 |
# File 'lib/fsr/app/speak.rb', line 19 def sendmsg "call-command: execute\nexecute-app-name: %s\nexecute-app-arg: %s\nevent-lock:true\n\n" % [app_name, arguments.join("|")] end |