File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Hochob/Sandbox/LupeRobot/Virtual Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -10,14 +10,16 @@ function espeakDecir(phrase) {
1010 var sleep = require ( 'sleep' )
1111 exec ( "echo " + phrase + " | espeak -v es-la -a 200 -p 50 -s 170 -w audio.wav" , puts ) ;
1212 sleep . msleep ( 500 ) ;
13- exec ( "aplay audio.wav" , puts ) ;
13+ exec ( "aplay audio.wav" , puts ) ;
14+ sendAck ( )
1415}
1516
1617function espeakSay ( phrase ) {
1718 var sleep = require ( 'sleep' )
1819 exec ( "echo " + phrase + " | espeak -v en-us -a 200 -p 50 -s 170 -w audio.wav" , puts ) ;
1920 sleep . msleep ( 500 ) ;
2021 exec ( "aplay audio.wav" , puts ) ;
22+ sendAck ( )
2123}
2224
2325var state = 'closed'
@@ -142,6 +144,11 @@ function sendStateUpdate () {
142144 client . publish ( 'lupe/state' , state )
143145}
144146
147+ function sendAck ( ) {
148+ console . log ( 'Sending Ack %s' , '1' )
149+ client . publish ( 'lupe/ack' , '1' )
150+ }
151+
145152function handleRequestOpen ( message ) {
146153 if ( state !== 'open' && state !== 'opening' ) {
147154 console . log ( 'Opening Lupe' )
You can’t perform that action at this time.
0 commit comments