Modified node.js version of Aldebaran's libqi-js v2.
See COPYING for license
For server-side nodejs usage use require('libqi')
.
To use with webpack require('libqi/browser')
or configure an alias to point 'libqi'
to 'socket.io-client/dist/socket.io'
var QiSession = require('libqi')
var session = QiSession({
debug: true,
host: '192.168.10.3', // Pepper's IP and port (defaults to 80)
onConnect: function (/* session */) {
console.log('Connected...')
session
.service('ALTextToSpeech')
.then(function (tts) {
return tts.say('Hello World!')
})
.then(function () {
console.log('Done...')
session.disconnect()
})
},
onDisconnect: function () {
console.log('Disconnected. Bye!')
}
})