Skip to content

Commit 4f4a563

Browse files
committed
Update
Signed-off-by: ´Abraham <xe1gyq@gmail.com>
1 parent e05a6c8 commit 4f4a563

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Hochob/Sandbox/LupeRobot/Virtual/Amikoo.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff 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

1617
function 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

2325
var 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+
145152
function handleRequestOpen (message) {
146153
if (state !== 'open' && state !== 'opening') {
147154
console.log('Opening Lupe')

0 commit comments

Comments
 (0)