Files
deepspeech-demo/lightcontroller.js
2023-08-01 14:20:25 +02:00

11 lines
310 B
JavaScript

const http = require('http')
module.exports = function (myEmitter) {
myEmitter.on('text', text => {
if (text.text.search('ight') > -1) {
if (text.text.search('on') > -1) http.get('http://localhost:3434/on')
if (text.text.search('of') > -1) http.get('http://localhost:3434/off')
}
})
}