Coder Social home page Coder Social logo

tjbot's Introduction

IBM TJBot

Maker Kits are a collection of DIY open source templates to build things with IBM AI services in a fun and easy way. IBM TJBot is the first maker kit in the collection. You can 3D print or laser cut the robot body, then use one of our recipes to bring him to life!

In addition, you can unleash your own creativity and create new recipes that bring TJBot to life using any of the available IBM AI services!

TJBot only works with a Raspberry Pi.

Build TJBot

You can make your own TJBot in a number of ways.

  • 3d Print or Laser Cut. If you have access to a 3D printer or laser cutter, you can print/cut TJBot yourself. Begin by downloading the design files and firing up your printer/cutter.
  • TJBot Full Kit. You can order a full TJBot kit with the laser cut cardboard and all the electronics from Sparkfun, Adafruit, or Robotkingdom.
  • TJBot Cardboard Kit. You can purchase the TJBot laser cut cardboard from Texas Laser Creations.

Electronics

There are a number of components you can add to TJBot to bring him to life. Not all of these are required for all recipes.

  • Raspberry Pi 3 + SD card preloaded with NOOBS. This is a required component to make TJBot work! πŸ€–
  • LED. We recommend the NeoPixel RGB LED (8mm), although TJBot supports Common Anode LEDs as well. Note that if you are not using a NeoPixel LED, you may also need to add resistors between it and the Raspberry Pi. Neopixel LEDs do not require resistors.
  • Female-to-female jumper wires. TJBot will only need 3 of these wires, so you’ll have extra.
  • Female-to-male jumper wires. TJBot will only need 3 of these wires, so you’ll have extra.
  • USB Microphone. Other brands of USB microphones should also work.
  • Mini Speaker. We recommend any small speaker with the ability to connect to a 3.5mm audio jack. We've had much success with the Anker Mini Bluetooth Speaker, although this product has been discontinued as of 2018. For the best audio experience, we recommend using a USB Audio Adapter to avoid audio interference with the LED and to avoid difficulties in making Bluetooth speakers work reliably.
  • Servo Motor. Note that the red (middle) wire is 5v, the brown wire is ground, and the orange wire is data.
  • Raspberry Pi Camera. Either the 5MP or 8MP camera will work.

Assembly

Once you have obtained your TJBot, please refer to the assembly instructions to put it all together.

For reference, here is the wiring diagram to hook up a Neopixel LED and servo to your Raspberry Pi.

TJBot expects LEDs and servos to be connected to specific kinds of pins, including voltage (+3.3v or +5v), ground, and data. See https://pinout.xyz for a complete pin diagram. The tables below shows the default pins expected for different components, although these pin numbers can be overridden in TJBot's configuration.

Neopixel LED

PIN type PIN Name Physical PIN
Data GPIO 18 Physical 12
Power +3.3v Physical 1
Ground Ground Physical 6

πŸ’‘ Be careful when connecting the LED! If it is connected the wrong way, you may end up burning it out. The Neopixel LED has a flat notch on one side; use this to orient the LED and figure out which pin is which.

Common Anode LED

PIN type PIN Name Physical PIN
Red GPIO 19 Physical 35
Power +3.3v Physical 17
Green GPIO 13 Physical 33
Blue GPIO 12 Physical 32

πŸ’‘ Common Anode LEDs and Neopixel LEDs can both be connected to TJBot at the same time and will shine the same color. However, TJBot's head only has room for one LED!

Servo

PIN type PIN Name Physical PIN
Data (orange) GPIO 7 Physical 26
Power (red) +5v Physical 2
Ground (brown) Ground Physical 14

Bring TJBot to Life

First, configure your Raspberry Pi for TJBot by running the bootstrap script.

curl -sL http://ibm.biz/tjbot-bootstrap | sudo sh -

Next, take a look at TJBot's recipes, which are pre-configured behaviors that bring TJBot to life using IBM's Watson AI services.

TJBot comes with these recipes to demonstrate different capabilities.

After checking out these recipes, we encourage you to take a look at featured recipes created by members of the #tjbot community!

Troubleshooting TJBot

Please take a look at the troubleshooting guide if you are having difficulties with TJBot.

Contribute to TJBot

TJBot is an open source project designed to make it fun and easy to interact with Watson. We’d love to see what you can make with him!

If you would like your own recipe included in our featured recipe list, please open an issue with a link to your repository and a demo video.

About TJBot

TJBot was affectionately named after Thomas J. Watson, the first Chairman and CEO of IBM. TJBot was created by Maryam Ashoori at IBM Research as an experiment to find the best practices in the design and implementation of cognitive objects. He was born on November 9, 2016 via this blog post.

License

This project uses the Apache License Version 2.0 software license.

tjbot's People

Contributors

bgbraga avatar boneskull avatar caskale avatar fivdi avatar fmanclossi avatar ianpartridge avatar jt-nti avatar jweisz avatar kyungmin-ibm avatar mattemyo avatar victordibia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tjbot's Issues

No Sound Output during wave.js

Hello,

using victordibias wave.js I managed to make Sherlock (which is what I call my TJBot) wave and (supposedly) dance to music. I say "supposedly", because the sound output is lacking, sadly. Testing with other applications my sound output works fine, its just wave.js this does not work with. I am using a USB speaker for sound output.

Error connecting to speech_to_text

When launching, errors look like this:

pi@raspberrypi:~/tjbot/recipes/speech_to_text $ sudo node stt.js
info: Hello from TJBot! My name is Watson.
I understand lots of colors. You can tell me to shine my light a different color by saying 'turn the light red' or 'change the light to green' or 'turn the light off'.
error: the speech_to_text service returned an error. type=error, isTrusted=false, _yaeti=true, , addEventListener=function _addEventListener(type, newListener) {
var
listenersType,
i, listener;

Then the command line gets into an endless loop.

Bluemix Credentials are checked and double checked. Any suggestions would be appreciated. Thank you.

using bluetooth mic

I'm trying to use a bluetooth mic with the STT app.
It exits just after it says
TJBot is listening, you may speak now.
[rpi-ws281x-native] This module requires being run with root-privileges. A non-functional stub of the interface will be returned.

When I use the plug-in USB mic, it works fine and prints what it thinks I said.
I can see the bluetooth mic in
pacmd list-sources ... it says it's at index 2.
But I don't know what to change in the micInstance config parameters to make it see this device.
Any hints, please?
Oh, I'm running this on Ubuntu Mate on a Pi 3, btw (as the bluetooth stuff doesn't work very well on Raspbian yet)

Wiring diagram

Please add the wiring diagram for the LED and the servo to this repo. I know that the Instructable has wiring for the LED but I don't see the wiring for the servo motor. Also it would be great not to have to hunt for these in Instructables, but rather have them right here. Thanks!

error: No speech detection for 60s

How can we avoid this error?

many many thanks!

error: the speech_to_text service returned an error. Error: No speech detected for 60s.

Large latancy about 7-9 seconds

Hi,

When i run conversation.js code all run correctly but i get big latency (in average 7 sec.). How can reduce the latency of TJBot?

Thanks.

Cannot find Module

I am having several problems with Errors when running the conversation.js and stt.js. In the instance below, the module that cannot be found is the 'rpi-gpio'. It would be so great if someone can help me to know how to reconnect or point to these modules. I have tried npm install -g. I have reinstalled everything from scratch and I still end up with these issues.

pi@raspberrypi:~/tjbot/recipes/conversation $ sudo node conversation.js
module.js:471
throw err;
^

Error: Cannot find module 'rpi-gpio'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (/home/pi/tjbot/recipes/conversation/conversation.js:40:12)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:389:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:502:3

making the new workspace in IBM conversation service

hi everyone
i have design the new conversation using IBM conversation service for TJBOT but when i copy workspace id along with downloaded json file and replace the default one coming with TJ,it's doesn't work TJBOT experience time out error any suggestion.
and also how can i combine conversation code with sentiment code.
finale how can i make the TJBOT code to run the moment i turn on my Raspberry pi3 without executing the script manually in cmd.
i'm in need of the above information my-email addr: [email protected]

LED (Neopixel) missing diagram/documentation

Can you add a fritzing diagram to show the connection to the Neopixel LED? After some digging I found out the following:

RPI 5V -- diode -- LED V
RPI GND -- LED GND
RPI 18 -- LED Data In

Thanks!

tj.play() specifies plughw:0,0?? Can't hear TJBot voice with USB sound card

Everything is working, except TJBot voice is not heard. I have a USB sound card (plugable) with mic and speakers plugged in.

Edited /usr/share/alsa/alsa.conf to set defaults.ctl.card and defaults.pcm.card both equal to 1

speaker-test -c2 [success!]
arecord --format cd MicTest2.wav -V mono [success!]
aplay MicTest2.wav [success!]
sudo node test.speaker.js [fail - no sound heard]
aplay /usr/share/sounds/alsa/Front_Center.wav [success!]

noticed from verbose logging that tj.play() specifies device=plughw:0,0
my usb sound card is at plughw:1,0

can I get tj.play() to use plughw:1,0?

Tweets

After running "Sudo node sentiment.js",its showing

"Not enough tweets collected to perform sentiment analysis"

I tried changing the "exports.sentiment.keyword" but same issue persisted.

TTS Voices Error: Not Authorized

I am now receiving the following error message.

error: unable to retrieve TTS voices Error: Not Authorized
at Request._callback (/home/pi/tjbot/recipes/conversation/node_modules/watson-developer-cloud/lib/requestwrapper.js:83:15)
at Request.self.callback (/home/pi/tjbot/recipes/conversation/node_modules/request/request.js:186:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request. (/home/pi/tjbot/recipes/conversation/node_modules/request/request.js:1081:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at IncomingMessage. (/home/pi/tjbot/recipes/conversation/node_modules/request/request.js:1001:12)
at IncomingMessage.g (events.js:291:16)
at emitNone (events.js:91:20)
at IncomingMessage.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)

conversation.js Error: TJBot.prototype.pulseOnce = function(color, duration = 1.0)

13 days ago I posted on https://www.instructables.com/id/Build-a-Talking-Robot-With-Watson-and-Raspberry-Pi/ as AlanU7 but so far no response. I'll just summerise the issue here.

I followed all the build steps and when running conversation.js got the error: TJBot.prototype.pulseOnce = function(color, duration = 1.0)

Whilst that instructable does not include the LED the code seems to be trying to control the LED. I then followed the instructable "Build TJBot Out of Cardboard" at http://www.instructables.com/id/Use-Your-Voice-to-Control-a-Light-With-Watson/ which does have the LED but get the same error when running sudo test.led.js

Note: I responded to my own post on instructables twice but the order is:
original post
reply 2
reply 3

I'm trying to get TJBot working for a talk I'm giving on May 9 so help much appreciated.
Thanks
Alan
PS1 I'll be happy to not have the LED as I wish to demonstrate Watson's conversation prowess!
PS2 On https://learn.adafruit.com/adafruit-neopixel-uberguide/overview they say the NeoPixels are not suitable for Raspberry Pi. I can solder an ordinary RGB LED but I guess the code will need changing quite a bit.

Issues with Bluetooth Speaker when using TJBot tests and samples

Hello, I am having an issue on my TJBot (Ziggy) using my Bluetooth speaker with TJBot tests and samples.

Here are some details:

  • The bluetooth speaker works for playing audio from TJBot without using TJBot samples or tests.
    -- aplay sample.wav works
    -- aplay -l lists no devices.
  • The bluetooth speaker works using aplay -D default sample.wav
  • The bluetooth speaker does not work using sudo aplay -D default sample.wav
  • The bluetooth speaker does not work using aplay -D plughw:0,0 sample.wav (or 0,1, or 1,0, or 1,1) - This does not work with sudo either.
  • I have copied the blacklist for the sound files to the proper location - if I don't have this copied over, my led light doesn't work properly.

Any help you can give is appreciated!

PS: here is a picture of Ziggy so you can see how adorable she is.

img_0587

tj.play is not a function

Hello I get this ? Any idea?

pi@raspberrypi:~/tjbot/bootstrap/tests $ sudo node test.speaker
/home/pi/tjbot/bootstrap/tests/test.speaker.js:26
tj.play(sound).then(function() {
^

TypeError: tj.play is not a function
at Object. (/home/pi/tjbot/bootstrap/tests/test.speaker.js:26:4)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.runMain (module.js:605:10)
at run (bootstrap_node.js:423:7)
at startup (bootstrap_node.js:147:9)
at bootstrap_node.js:538:3

[rpi-ws281x-native] Could not verify raspberry-pi version.

Hi Team,

I am using speech to text recipe. When i try to use sudo node stt.js, I get the following error

[rpi-ws281x-native] Could not verify raspberry-pi version. If this is wrong and you are running this on a raspberry-pi, please file a bug-report at https://github.com/beyondscreen/node-rpi-ws281x-native/issues
image

I created new instance for credentials for speech to text & also deleted any old services.
Could you please help in this regard

Thanks
Divya

Sending custom variable to Conversation Editor

Hi all, appreciated the newer and cleaner code, quick question, with the old code (before March) I can create custom variables and sent them with input array directly in the .js file, and also receive them too. Where do I do that now? Or is it possible with the new code?

Clarify NeoPixel RGB LED size

I'm pretty sure the NeoPixel RGB LED should be 8mm (measured the hole on a 3D printed head, and that seems to be the size the instructables link to) however the links on in github take you to 5mm LEDs.

It would be great to update the link text to indicate the required size explicitly, and update the links to point to the correct size.

Issues with Sleep module, stopping install

[email protected] install /home/pi/tjbot/recipes/conversation/node_modules/tjbot/node_modules/sleep

node-gyp rebuild

make: Entering directory '/home/pi/tjbot/recipes/conversation/node_modules/tjbot/node_modules/sleep/build'
CXX(target) Release/obj.target/node_sleep/sleep.o
In file included from ../sleep.cc:2:0:
../node_modules/nan/nan.h:326:47: error: β€˜REPLACE_INVALID_UTF8’ is not a member of β€˜v8::String’
static const unsigned kReplaceInvalidUtf8 = v8::String::REPLACE_INVALID_UTF8;
^
node_sleep.target.mk:82: recipe for target 'Release/obj.target/node_sleep/sleep.o' failed
make: *** [Release/obj.target/node_sleep/sleep.o] Error 1
make: Leaving directory '/home/pi/tjbot/recipes/conversation/node_modules/tjbot/node_modules/sleep/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/share/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:809:12)
gyp ERR! System Linux 4.9.24-v7+
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/pi/tjbot/recipes/conversation/node_modules/tjbot/node_modules/sleep
gyp ERR! node -v v0.10.29
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm WARN engine [email protected]: wanted: {"node":">= 0.12"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN engine [email protected]: wanted: {"node":">=0.10.32"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN engine [email protected]: wanted: {"node":">=0.10.32"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read

Change the language of the TJbot issue

HI, when we try change the language of TJbot on conversation.js

// set up TJBot's configuration
var tjConfig = {
log: {
level: 'verbose'
},
robot: {
gender: 'female',
name: 'Maria'
},
listen: {
language: 'pt-BR'
//language: 'en-US'
},
speak: {
language: 'pt-BR'
//language: 'en-US'
}
};

The TJbot is not recognizing the name when we set the language to pt-BR, but when we try do the same on en-US the change name works.

When we told the name of robot "Maria" and setup the language of en-US works, but when we set to pt-BR the tjbot not trigger any action.

TJbot is thinking - but not talking back to me

Dear all,

My TJbot hears what I say, but does not respond to me, either in the terminal or on audio. No errors are given either. The output looks as follows:

pi@TJbot:~/tjbot/recipes/conversation $ sudo node conversation.js
info: Hello from TJBot! My name is TJ.
You can ask me to introduce myself or tell you a joke.
Try saying, "TJ, please introduce yourself" or "TJ, who are you?"
You can also say, "TJ, tell me a joke!"
info: TJBot heard: could 
info: TJBot heard: I 
info: TJBot heard: TJ tell me a joke 
info: TJBot heard: but 
{ filename: '/tmp/tjbot117825-9216-l4te4b.skrq',
  gain: 100,
  debug: true,
  player: 'aplay',
  device: 'plughw:0,0' }

At first I thought it was an audio problem, as I had found out through aplay that plughw needed to be 2,0 rather than 0,0. I have bought a standard ADAfruit TJbot package that contains a USB speaker and USB microphone. Testing both devices separately, they work fine. You can find the output from aplay and arecord below:

Aplay

pi@TJbot:~/tjbot/recipes/conversation $ aplay -l
** List of PLAYBACK Hardware Devices **
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Device_1 [USB2.0 Device], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Arecord

pi@TJbot:~/tjbot/recipes/conversation $ arecord -l
** List of CAPTURE Hardware Devices **
card 1: Device [USB PnP Sound Device], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

I tried changing the alsa.conf file, and when that didn't work I made sure the raspberry pi itself recognized my audio devices and set the USB speaker to default, I created an asound.conf file and I even adapted the conversation.js and sst.js files. See changes below:

Alsa.conf

defaults.ctl.card 2
defaults.pcm.card 2
defaults.pcm.device 0
defaults.pcm.subdevice -1
defaults.pcm.nonblock 1
defaults.pcm.compat 0

Asound.conf

GNU nano 2.2.6                       File: asound.conf                                                     

pcm.!default {
        type hw
        card 2
}

ctl.!default {
        type hw
        card 2
}

Conversation.js & sst.js

// set up TJBot's configuration
var tjConfig = {
    verboseLogging: true,
    speakerDeviceId: 'plughw:2,0',
    microphoneDeviceId: 'plughw:1,0',
        robot: {
                name: 'TJ',
                homophones: ['DJ','Deejay','Teejay'],
                gender: 'female'
    }
};

I followed the tutorial of instructables when setting up TJ and also looked at the troubleshooting section:

If you see TJBot's response on the terminal but don't hear TJBot talking, there is a good chance that one of these two things has happened: (1) The audio output is directed to a wrong channel (you can fix it from raspi-config), (2) your sound modules are blocked. In that case, go to /etc/modprobe.d/ and remove blacklist-rgb-led.conf

Then run the following command:
sudo update-initramfs -u
Reboot and confirm the "snd" modules are running by executing the command "lsmod". This should solve the problem.
lsmod

The first option does not seem to apply to me since I have a USB speaker, no audio jack or HDMI. For the second option, I don't even have the file blacklist-rgb-led.conf. Since I tried most audio-related troubleshooting, I'm wondering whether it is something with TJ just not responding, but as far as I'm aware I have installed the Conversation, Speech-to-Text and Text-to-Speech correctly and my credentials have been correctly inserted. Can you please help me?

Continuous Conversation

Hi,

Would you please tell how to work with "continuous conversation" ?
I setup dialog with "continuous conversation", It seems can not go to second dialog.
I tested the dialog and it works on Web.

Please help.

Thank you.

No audio during test.speaker.js

I bought the Bluetooth speaker you recommend in the instructions.
https://www.amazon.com/gp/product/B00OEPCHL2/
Anker A7910

I have successfully connected it to the Rasperry Pi 3.
I can play audio from youtube in Chromium.

Bu when I run the test.speaker.js script
sudo node test.speaker.js
It never plays the audio.

pi@tinker01:~/Desktop/tjbot/bootstrap/tests $ sudo node test.speaker.js 
info: Hello from TJBot! My name is Watson.
verbose: TJBot library version v1.3.0
debug: Playing audio with parameters:  filename=/usr/share/sounds/alsa/Front_Center.wav, gain=100, debug=true, player=aplay, device=plughw:0,0
{ filename: '/usr/share/sounds/alsa/Front_Center.wav',
  gain: 100,
  debug: true,
  player: 'aplay',
  device: 'plughw:0,0' }
debug: audio playback finished
Did you hear the words "Front Center"? Y/N > n
Unhandled rejection Error: expected audio to play, please check that you speaker is plugged in, turned on, and set as the current audio output device.
    at /home/pi/Desktop/tjbot/bootstrap/tests/test.speaker.js:29:15
    at tryCatcher (/home/pi/Desktop/tjbot/bootstrap/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/home/pi/Desktop/tjbot/bootstrap/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/home/pi/Desktop/tjbot/bootstrap/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/home/pi/Desktop/tjbot/bootstrap/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/home/pi/Desktop/tjbot/bootstrap/node_modules/bluebird/js/release/promise.js:693:18)
    at Async._drainQueue (/home/pi/Desktop/tjbot/bootstrap/node_modules/bluebird/js/release/async.js:133:16)
    at Async._drainQueues (/home/pi/Desktop/tjbot/bootstrap/node_modules/bluebird/js/release/async.js:143:10)
    at Immediate.Async.drainQueues (/home/pi/Desktop/tjbot/bootstrap/node_modules/bluebird/js/release/async.js:17:14)
    at runCallback (timers.js:672:20)
    at tryOnImmediate (timers.js:645:5)
    at processImmediate [as _immediateCallback] (timers.js:617:5)

pi@tinker01:~/Desktop/tjbot/bootstrap/tests $ 

I followed the instructions to manually install.

Node conversation.js Issue

Hello

Just installed following your instructions and encountered this when I execute Node conversation.js

Please can you help please?

J
tj

Conversation workspaceid not valid

I am getting an error about the workspaceid not being a valid.

error: the conversation service returned an error. Error: URL workspaceid parameter is not a valid GUID.
at Request._callback (/home/pi/tjbot/recipes/conversation/node_modules/watson-developer-cloud/lib/requestwrapper.js:83:15)
at Request.self.callback (/home/pi/tjbot/recipes/conversation/node_modules/request/request.js:186:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request. (/home/pi/tjbot/recipes/conversation/node_modules/request/request.js:1081:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at Gunzip. (/home/pi/tjbot/recipes/conversation/node_modules/request/request.js:1001:12)
at Gunzip.g (events.js:291:16)
at emitNone (events.js:91:20)
at Gunzip.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)

I verified that I have the correct wordspace ID in the config.js file.

LED is not changing color

I can speak to it and the response comes back correctly displayed in the console but the LED will always shows light blue.

speech_to_text no longer compiles

Hi - on Raspbian 4.1.18-v7+ (should be latest, just ran apt-get upgrade)
when I run the "npm install" to compile all the modules for the speech_to_text example, I get compile errors on the rpi-ws281x-native module:
pi@raspberrypi:~/tjbot/recipes/speech_to_text $ npm install rpi-ws281x-native
\

[email protected] install /home/pi/tjbot/recipes/speech_to_text/node_modules/rpi-ws281x-native
node-gyp rebuild

make: Entering directory '/home/pi/tjbot/recipes/speech_to_text/node_modules/rpi-ws281x-native/build'
CC(target) Release/obj.target/rpi_libws2811/src/rpi_ws281x/ws2811.o
CC(target) Release/obj.target/rpi_libws2811/src/rpi_ws281x/pwm.o
CC(target) Release/obj.target/rpi_libws2811/src/rpi_ws281x/dma.o
CC(target) Release/obj.target/rpi_libws2811/src/rpi_ws281x/mailbox.o
CC(target) Release/obj.target/rpi_libws2811/src/rpi_ws281x/board_info.o
AR(target) Release/obj.target/rpi_libws2811.a
COPY Release/rpi_libws2811.a
CXX(target) Release/obj.target/rpi_ws281x/src/rpi-ws281x.o
In file included from ../src/rpi-ws281x.cc:1:0:
../node_modules/nan/nan.h:324:47: error: β€˜REPLACE_INVALID_UTF8’ is not a member of β€˜v8::String’
static const unsigned kReplaceInvalidUtf8 = v8::String::REPLACE_INVALID_UTF8;
^
rpi_ws281x.target.mk:85: recipe for target 'Release/obj.target/rpi_ws281x/src/rpi-ws281x.o' failed
make: *** [Release/obj.target/rpi_ws281x/src/rpi-ws281x.o] Error 1
make: Leaving directory '/home/pi/tjbot/recipes/speech_to_text/node_modules/rpi-ws281x-native/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/share/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:809:12)
gyp ERR! System Linux 4.1.18-v7+
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/pi/tjbot/recipes/speech_to_text/node_modules/rpi-ws281x-native
gyp ERR! node -v v0.10.29
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the rpi-ws281x-native package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls rpi-ws281x-native
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 4.1.18-v7+
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "rpi-ws281x-native"
npm ERR! cwd /home/pi/tjbot/recipes/speech_to_text
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/pi/tjbot/recipes/speech_to_text/npm-debug.log
npm ERR! not ok code 0

smart_formatting data type

Hi,

It seems the data type of smart_formatting is bool, please check.

diff --git a/recipes/conversation/conversation.js b/recipes/conversation/conversation.js
index 9211dd9..9e01dca 100755
--- a/recipes/conversation/conversation.js
+++ b/recipes/conversation/conversation.js
@@ -88,7 +88,7 @@ textStream = micInputStream.pipe(speech_to_text.createRecognizeStream({
   content_type: 'audio/l16; rate=44100; channels=2',
   interim_results: true,
   keywords: [attentionWord],
-  smart_formatting: 'true',
+  smart_formatting: true,
   keywords_threshold: 0.5
 }));

Thank you.

Can't hear my tjbot

I followed all the instructions and when i talk i can see in the terminal what i said (except the fact that if i say watson, the tjbot understand what song).
by the way, after i see what i said, nothing happened. the tjbot doesn't speak and no answers at all even as text. I checked if there was a problem with the audio, but if i go to youtube i can hear the sound without problem. Even testing the speakers it works, so i can't understand why i can't communicate with the tjbot. I made all the procedure 4 times from zero..... :( please help

Huge delay, is it normal??

There's a huge delay on listening. is it normal?
Works fine on nodered, manual command. TJBot doesn't

TJ Bot Error

I followed this url steps : http://learn.linksprite.com/raspberry-pi/build-a-talking-robot-with-watson/

& after step 7 I got these errors :

pi@raspberrypi:~/tjbot/recipes/conversation $ : node conversation.js

module.js:471
throw err;
^

Error: Cannot find module './config'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (/home/pi/tjbot/recipes/conversation/conversation.js:18:14)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:383:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:496:3

& I couldn’t fix it yet.

TJBot initializing microphone

Hey guys,
I sit here for a while but I can't find somebody with the same Problem :/ when I run "sudo node stt.js this happend:
`pi@raspberrypi:~/tjbot/recipes/speech_to_text $ sudo node stt.js
verbose: TJBot initializing LED
verbose: TJBot initializing microphone
verbose: TJBot initializing speech_to_text service
info: Hello from TJBot! My name is Watson.
verbose: TJBot library version v1.3.0
I understand lots of colors. You can tell me to shine my light a different color by saying 'turn the light red' or 'change the light to green' or 'turn the light off'.
verbose: TJBot initializing microphone
error: the speech_to_text service returned an error. type=error, isTrusted=false, _yaeti=true, , addEventListener=function _addEventListener(type, newListener) {
var
listenersType,
i, listener;

if (!type || !newListener) {
	return;
}

listenersType = this._listeners[type];
if (listenersType === undefined) {
	this._listeners[type] = listenersType = [];
}

for (i = 0; !!(listener = listenersType[i]); i++) {
	if (listener === newListener) {
		return;
	}
}

listenersType.push(newListener);

}, removeEventListener=function _removeEventListener(type, oldListener) {
var
listenersType,
i, listener;

if (!type || !oldListener) {
	return;
}

listenersType = this._listeners[type];
if (listenersType === undefined) {
	return;
}

for (i = 0; !!(listener = listenersType[i]); i++) {
	if (listener === oldListener) {
		listenersType.splice(i, 1);
		break;
	}
}

if (listenersType.length === 0) {
	delete this._listeners[type];
}

}, dispatchEvent=function _dispatchEvent(event) {
var
type,
listenersType,
dummyListener,
stopImmediatePropagation = false,
i, listener;

if (!event || typeof event.type !== 'string') {
	throw new Error('`event` must have a valid `type` property');
}

// Do some stuff to emulate DOM Event behavior (just if this is not a
// DOM Event object)
if (event._yaeti) {
	event.target = this;
	event.cancelable = true;
}

// Attempt to override the stopImmediatePropagation() method
try {
	event.stopImmediatePropagation = function () {
		stopImmediatePropagation = true;
	};
} catch (error) {}

type = event.type;
listenersType = (this._listeners[type] || []);

dummyListener = this['on' + type];
if (typeof dummyListener === 'function') {
	dummyListener.call(this, event);
}

for (i = 0; !!(listener = listenersType[i]); i++) {
	if (stopImmediatePropagation) {
		break;
	}

	listener.call(this, event);
}

return !event.defaultPrevented;

}, _url=wss://stream.watsonplatform.net/speech-to-text/api/v1/recognize?model=en-US_BroadbandModel, _readyState=3, _protocol=undefined, _extensions=, _bufferedAmount=0, _binaryType=arraybuffer, _connection=undefined, domain=null, , _eventsCount=0, _maxListeners=undefined, maxReceivedFrameSize=1048576, maxReceivedMessageSize=8388608, fragmentOutgoingMessages=true, fragmentationThreshold=16384, webSocketVersion=13, assembleFragments=true, disableNagleAlgorithm=true, closeTimeout=5000, , _req=null, protocols=[], origin=null, protocol=wss:, slashes=true, auth=null, host=stream.watsonplatform.net, port=443, hostname=stream.watsonplatform.net, hash=null, search=?model=en-US_BroadbandModel, query=model=en-US_BroadbandModel, pathname=/speech-to-text/api/v1/recognize, path=/speech-to-text/api/v1/recognize?model=en-US_BroadbandModel, href=wss://stream.watsonplatform.net/speech-to-text/api/v1/recognize?model=en-US_BroadbandModel, secure=true, base64nonce=4a19V/CYg8gg6IZW/a+jzw==, onerror=function (error) {
self.listening = false;
self.emit('error', error);
}, onopen=function () {
socket.send(JSON.stringify(openingMessage));
self.emit('connect');
}, onclose=function (e) {
self.listening = false;
self.push(null);
/**
* @event RecognizeStream#close
* @param {Number} reasonCode
* @param {String} description
*/
self.emit('close', e.code, e.reason);
}, onmessage=function (frame) {
if (typeof frame.data !== 'string') {
return emitError('Unexpected binary data received from server', frame);
}

let data;
try {
  data = JSON.parse(frame.data);
} catch (jsonEx) {
  return emitError('Invalid JSON received from service:', frame, jsonEx);
}

let recognized = false;
if (data.error) {
  emitError(data.error, frame);
  recognized = true;
}

if (data.state === 'listening') {
  // this is emitted both when the server is ready for audio, and after we send the close message to indicate that it's done processing
  if (!self.listening) {
    self.listening = true;
    self.emit('listening');
  } else {
    self.listening = false;
    socket.close();
  }
  recognized = true;
}

if (data.results) {
  /**
   * Object with interim or final results, including possible alternatives. May have no results at all for empty audio files.
   * @event RecognizeStream#results
   * @param {Object} results
   */
  self.emit('results', data);
  // note: currently there is always either no entries or exactly 1 entry in the results array. However, this may change in the future.
  if (data.results[0] && data.results[0].final && data.results[0].alternatives) {
    /**
     * Finalized text
     * @event RecognizeStream#data
     * @param {String} transcript
     */
    self.push(data.results[0].alternatives[0].transcript, 'utf8'); // this is the "data" event that can be easily piped to other streams
  }
  recognized = true;
}

// note: some messages will have both results and speaker_labels
// this will cause them to be emitted twice - once for each event
if (data.speaker_labels) {
  /**
   * Speaker labels
   * @event RecognizeStream#speaker_labels
   * @param {Object} speaker_labels
   */
  self.emit('speaker_labels', data);
  recognized = true;
}

if (!recognized) {
  emitError('Unrecognised message from server', frame);
}

}, cancelable=true, stopImmediatePropagation=function () {
stopImmediatePropagation = true;
}
verbose: TJBot initializing microphone
`
Please help xD Thanke you!

Conversation can only do 1 node

When I converse, I think watson goes back to the beginning of the node after it returns my first response when I have subsequent nodes waiting. I have tested the conversation dialog on IBM's website and it works fine

Error: TJBot is not configured to listen.

Hi, Here is the output when I tried conversation:
I tried to create the speech to txt service and copy password and username to config.js serveral time, but no luck.
But same credential works in the another speech to txt recipe. Any ideas?
By the way, in speech to txt recipe, the latency is so long, ~10s. I am in AU. Any reason? long distance?

Thank you very much!

sudo node conversation.js
sudo: unable to resolve host shopt-snocasematch
verbose: TJBot initializing microphone
info: Hello from TJBot! My name is Watson.
verbose: TJBot library version v1.3.0
You can ask me to introduce myself or tell you a joke.
Try saying, "Watson, please introduce yourself" or "Watson, who are you?"
You can also say, "Watson, tell me a joke!"
/home/pi/tjbot/recipes/conversation/node_modules/tjbot/lib/tjbot.js:470
throw new Error(
^

Error: TJBot is not configured to listen. Please check that you included credentials for the Watson "speech_to_text" service in the TJBot constructor.
at TJBot._assertCapability (/home/pi/tjbot/recipes/conversation/node_modules/tjbot/lib/tjbot.js:470:23)
at TJBot.listen (/home/pi/tjbot/recipes/conversation/node_modules/tjbot/lib/tjbot.js:635:10)
at Object. (/home/pi/tjbot/recipes/conversation/conversation.js:45:4)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:390:7)
at startup (bootstrap_node.js:150:9)
at bootstrap_node.js:505:3`

Error: Resource Not found Error:

I get the following error (below) when I try the conversation recipe. I see that the speech is getting converted to text(visible on terminal) and then the error comes out when it is time for the response from Watson. So I don't hear anything and then it goes back to listening mode with the below error:

pi@raspberrypi:~/tjbot/recipes/conversation $ sudo node conversation.js
TJBot is listening, you may speak now.
===== Speech to Text ===== : hello Watson
msg sent to conversation: hello
error: { Error: Resource not found
at Request._callback (/home/pi/tjbot/recipes/conversation/node_modules/watson-developer-cloud/lib/requestwrapper.js:77:15)
at Request.self.callback (/home/pi/tjbot/recipes/conversation/node_modules/request/request.js:186:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request. (/home/pi/tjbot/recipes/conversation/node_modules/request/request.js:1081:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at Gunzip. (/home/pi/tjbot/recipes/conversation/node_modules/request/request.js:1001:12)
at Gunzip.g (events.js:291:16)
at emitNone (events.js:91:20) code: undefined, error: 'Resource not found' }
===== Speech to Text ===== : 0
Waiting to hear watson

My env:

  • Raspberry PI 3 (Got the exact same error on another older Raspberry version as well)
  • Node v6.9.5
  • NPM v3.10.10

Speech to Text bad listening

Works only using curl, nodered, but this tjbot isn't working..

The words aren't paraphrasing right. What should I do?

pi@Rose:/Desktop/tjbot/recipes/speech_to_text $ node stt.js
verbose: TJBot initializing LED
[rpi-ws281x-native] This module requires being run with root-privileges. A non-functional stub of the interface will be returned.
verbose: TJBot initializing microphone
verbose: TJBot initializing speech_to_text service
info: Hello from TJBot! My name is Watson.
verbose: TJBot library version v1.3.0
I understand lots of colors. You can tell me to shine my light a different color by saying 'turn the light red' or 'change the light to green' or 'turn the light off'.
verbose: TJBot initializing microphone
info: TJBot heard: a
info: TJBot heard: no
info: TJBot heard: the
info: TJBot heard: I'm
info: TJBot heard: but
info: TJBot heard: I

^Cpi@Rose:/Desktop/tjbot/recipes/speech_to_text $

Errors building conversation.js - fibers.cc and v8.h

When building the conversation:

pi@raspberrypi:~/tjbot/recipes/conversation $ npm install

> [email protected] install /home/pi/tjbot/recipes/conversation/node_modules/fibers
> node build.js || nodejs build.js

make: Entering directory '/home/pi/tjbot/recipes/conversation/node_modules/fibers/build'
  CXX(target) Release/obj.target/fibers/src/fibers.o
../src/fibers.cc: In function β€˜v8::Handle<v8::String> uni::NewLatin1String(v8::Isolate*, const char*)’:
../src/fibers.cc:122:64: warning: β€˜static v8::Local<v8::String> v8::String::NewFromOneByte(v8::Isolate*, const uint8_t*, v8::String::NewStringType, int)’ is deprecated (declared at /home/pi/.node-gyp/6.11.1/include/node/v8.h:2332): Use maybe version [-Wdeprecated-declarations]
   return String::NewFromOneByte(isolate, (const uint8_t*)string);
                                                                ^
../src/fibers.cc: In function β€˜v8::Handle<v8::String> uni::NewLatin1Symbol(v8::Isolate*, const char*)’:
../src/fibers.cc:126:64: warning: β€˜static v8::Local<v8::String> v8::String::NewFromOneByte(v8::Isolate*, const uint8_t*, v8::String::NewStringType, int)’ is deprecated (declared at /home/pi/.node-gyp/6.11.1/include/node/v8.h:2332): Use maybe version [-Wdeprecated-declarations]
   return String::NewFromOneByte(isolate, (const uint8_t*)string);
                                                                ^
../src/fibers.cc: In static member function β€˜static uni::FunctionType Fiber::New(const Arguments&)’:
../src/fibers.cc:433:99: warning: β€˜v8::Local<v8::Object> v8::Function::NewInstance(int, v8::Local<v8::Value>*) const’ is deprecated (declared at /home/pi/.node-gyp/6.11.1/include/node/v8.h:3271): Use maybe version [-Wdeprecated-declarations]
     return uni::Return(uni::Deref(Isolate::GetCurrent(), tmpl)->GetFunction()->NewInstance(1, argv), args);
                                                                                                   ^
../src/fibers.cc: In static member function β€˜static void Fiber::RunFiber(void**)’:
../src/fibers.cc:621:14: warning: β€˜v8::TryCatch::TryCatch()’ is deprecated (declared at /home/pi/.node-gyp/6.11.1/include/node/v8.h:6773): Use isolate version [-Wdeprecated-declarations]
     TryCatch try_catch;
              ^
../src/fibers.cc: In static member function β€˜static void Fiber::SetPoolSize(v8::Local<v8::String>, v8::Local<v8::Value>, const SetterCallbackInfo&)’:
../src/fibers.cc:741:43: warning: β€˜v8::Local<v8::Number> v8::Value::ToNumber() const’ is deprecated (declared at /home/pi/.node-gyp/6.11.1/include/node/v8.h:8173): Use maybe version [-Wdeprecated-declarations]
    Coroutine::pool_size = value->ToNumber()->Value();
                                           ^
../src/fibers.cc: In static member function β€˜static void Fiber::Init(v8::Handle<v8::Object>)’:
../src/fibers.cc:793:72: warning: β€˜bool v8::Object::SetAccessor(v8::Local<v8::String>, v8::AccessorGetterCallback, v8::AccessorSetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute)’ is deprecated (declared at /home/pi/.node-gyp/6.11.1/include/node/v8.h:2743): Use maybe version [-Wdeprecated-declarations]
    fn->SetAccessor(uni::NewLatin1Symbol(isolate, "current"), GetCurrent);
                                                                        ^
../src/fibers.cc:794:87: warning: β€˜bool v8::Object::SetAccessor(v8::Local<v8::String>, v8::AccessorGetterCallback, v8::AccessorSetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute)’ is deprecated (declared at /home/pi/.node-gyp/6.11.1/include/node/v8.h:2743): Use maybe version [-Wdeprecated-declarations]
    fn->SetAccessor(uni::NewLatin1Symbol(isolate, "poolSize"), GetPoolSize, SetPoolSize);
                                                                                       ^
../src/fibers.cc:795:84: warning: β€˜bool v8::Object::SetAccessor(v8::Local<v8::String>, v8::AccessorGetterCallback, v8::AccessorSetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute)’ is deprecated (declared at /home/pi/.node-gyp/6.11.1/include/node/v8.h:2743): Use maybe version [-Wdeprecated-declarations]
    fn->SetAccessor(uni::NewLatin1Symbol(isolate, "fibersCreated"), GetFibersCreated);
                                                                                    ^
../src/fibers.cc: In instantiation of β€˜void uni::MakeWeak(v8::Isolate*, v8::Persistent<S>&, P*) [with void (* F)(void*) = Fiber::WeakCallback; T = v8::Object; P = void]’:
../src/fibers.cc:351:60:   required from here
../src/fibers.cc:43:3: warning: β€˜void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackData<T, P>::Callback) [with P = void; T = v8::Object; typename v8::WeakCallbackData<T, P>::Callback = void (*)(const v8::WeakCallbackData<v8::Object, void>&)]’ is deprecated (declared at /home/pi/.node-gyp/6.11.1/include/node/v8.h:7649): use WeakCallbackInfo version [-Wdeprecated-declarations]
   handle.SetWeak(val, WeakCallbackShim<F>);
   ^
In file included from /home/pi/.node-gyp/6.11.1/include/node/node.h:42:0,
                 from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
/home/pi/.node-gyp/6.11.1/include/node/v8.h: In instantiation of β€˜void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackData<T, P>::Callback) [with P = void; T = v8::Object; typename v8::WeakCallbackData<T, P>::Callback = void (*)(const v8::WeakCallbackData<v8::Object, void>&)]’:
../src/fibers.cc:43:3:   required from β€˜void uni::MakeWeak(v8::Isolate*, v8::Persistent<S>&, P*) [with void (* F)(void*) = Fiber::WeakCallback; T = v8::Object; P = void]’
../src/fibers.cc:351:60:   required from here
/home/pi/.node-gyp/6.11.1/include/node/v8.h:7652:10: warning: β€˜void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackData<S, P>::Callback) [with S = v8::Object; P = void; T = v8::Object; typename v8::WeakCallbackData<S, P>::Callback = void (*)(const v8::WeakCallbackData<v8::Object, void>&)]’ is deprecated (declared at /home/pi/.node-gyp/6.11.1/include/node/v8.h:7637): use WeakCallbackInfo version [-Wdeprecated-declarations]
   SetWeak<T, P>(parameter, callback);
          ^
  CXX(target) Release/obj.target/fibers/src/coroutine.o
  CC(target) Release/obj.target/fibers/src/libcoro/coro.o
  SOLINK_MODULE(target) Release/obj.target/fibers.node
  COPY Release/fibers.node
make: Leaving directory '/home/pi/tjbot/recipes/conversation/node_modules/fibers/build'
Installed in `/home/pi/tjbot/recipes/conversation/node_modules/fibers/bin/linux-arm-48/fibers.node`

> [email protected] install /home/pi/tjbot/recipes/conversation/node_modules/pigpio
> node-gyp rebuild

make: Entering directory '/home/pi/tjbot/recipes/conversation/node_modules/pigpio/build'
  CXX(target) Release/obj.target/pigpio/src/pigpio.o
  SOLINK_MODULE(target) Release/obj.target/pigpio.node
  COPY Release/pigpio.node
make: Leaving directory '/home/pi/tjbot/recipes/conversation/node_modules/pigpio/build'

> [email protected] install /home/pi/tjbot/recipes/conversation/node_modules/rpi-ws281x-native
> node-gyp rebuild

make: Entering directory '/home/pi/tjbot/recipes/conversation/node_modules/rpi-ws281x-native/build'
  CC(target) Release/obj.target/rpi_libws2811/src/rpi_ws281x/ws2811.o
  CC(target) Release/obj.target/rpi_libws2811/src/rpi_ws281x/pwm.o
  CC(target) Release/obj.target/rpi_libws2811/src/rpi_ws281x/dma.o
  CC(target) Release/obj.target/rpi_libws2811/src/rpi_ws281x/mailbox.o
  CC(target) Release/obj.target/rpi_libws2811/src/rpi_ws281x/board_info.o
  AR(target) Release/obj.target/rpi_libws2811.a
  COPY Release/rpi_libws2811.a
  CXX(target) Release/obj.target/rpi_ws281x/src/rpi-ws281x.o
../src/rpi-ws281x.cc: In function β€˜void init(const Nan::FunctionCallbackInfo<v8::Value>&)’:
../src/rpi-ws281x.cc:100:38: warning: β€˜bool v8::Object::HasOwnProperty(v8::Local<v8::String>)’ is deprecated (declared at /home/pi/.node-gyp/6.11.1/include/node/v8.h:2878): Use maybe version [-Wdeprecated-declarations]
     if(config->HasOwnProperty(symFreq)) {
                                      ^
../src/rpi-ws281x.cc:104:40: warning: β€˜bool v8::Object::HasOwnProperty(v8::Local<v8::String>)’ is deprecated (declared at /home/pi/.node-gyp/6.11.1/include/node/v8.h:2878): Use maybe version [-Wdeprecated-declarations]
     if(config->HasOwnProperty(symDmaNum)) {
                                        ^
../src/rpi-ws281x.cc:108:41: warning: β€˜bool v8::Object::HasOwnProperty(v8::Local<v8::String>)’ is deprecated (declared at /home/pi/.node-gyp/6.11.1/include/node/v8.h:2878): Use maybe version [-Wdeprecated-declarations]
     if(config->HasOwnProperty(symGpioPin)) {
                                         ^
../src/rpi-ws281x.cc:112:40: warning: β€˜bool v8::Object::HasOwnProperty(v8::Local<v8::String>)’ is deprecated (declared at /home/pi/.node-gyp/6.11.1/include/node/v8.h:2878): Use maybe version [-Wdeprecated-declarations]
     if(config->HasOwnProperty(symInvert)) {
                                        ^
../src/rpi-ws281x.cc:116:44: warning: β€˜bool v8::Object::HasOwnProperty(v8::Local<v8::String>)’ is deprecated (declared at /home/pi/.node-gyp/6.11.1/include/node/v8.h:2878): Use maybe version [-Wdeprecated-declarations]
     if(config->HasOwnProperty(symBrightness)) {
                                            ^
  SOLINK_MODULE(target) Release/obj.target/rpi_ws281x.node
  COPY Release/rpi_ws281x.node
  COPY ../lib/binding/rpi_ws281x.node
  TOUCH Release/obj.target/action_after_build.stamp
make: Leaving directory '/home/pi/tjbot/recipes/conversation/node_modules/rpi-ws281x-native/build'

> [email protected] install /home/pi/tjbot/recipes/conversation/node_modules/sleep
> node-gyp rebuild

make: Entering directory '/home/pi/tjbot/recipes/conversation/node_modules/sleep/build'
  CXX(target) Release/obj.target/node_sleep/sleep.o
  SOLINK_MODULE(target) Release/obj.target/node_sleep.node
  COPY Release/node_sleep.node
make: Leaving directory '/home/pi/tjbot/recipes/conversation/node_modules/sleep/build'

> [email protected] install /home/pi/tjbot/recipes/conversation/node_modules/websocket
> (node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory '/home/pi/tjbot/recipes/conversation/node_modules/websocket/build'
  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
  SOLINK_MODULE(target) Release/obj.target/bufferutil.node
  COPY Release/bufferutil.node
  CXX(target) Release/obj.target/validation/src/validation.o
  SOLINK_MODULE(target) Release/obj.target/validation.node
  COPY Release/validation.node
make: Leaving directory '/home/pi/tjbot/recipes/conversation/node_modules/websocket/build'
[email protected] /home/pi/tjbot/recipes/conversation
└─┬ [email protected] 
  β”œβ”€β”¬ [email protected] 
  β”‚ └─┬ [email protected] 
  β”‚   └── [email protected] 
  β”œβ”€β”¬ [email protected] 
  β”‚ β”œβ”€β”€ [email protected] 
  β”‚ β”œβ”€β”€ [email protected] 
  β”‚ └── [email protected] 
  β”œβ”€β”€ [email protected] 
  β”œβ”€β”€ [email protected] 
  β”œβ”€β”€ [email protected] 
  β”œβ”€β”€ [email protected] 
  β”œβ”€β”¬ [email protected] 
  β”‚ β”œβ”€β”¬ [email protected] 
  β”‚ β”‚ └── [email protected] 
  β”‚ └─┬ [email protected] 
  β”‚   β”œβ”€β”¬ [email protected] 
  β”‚   β”‚ └── [email protected] 
  β”‚   β”œβ”€β”€ [email protected] 
  β”‚   └── [email protected] 
  β”œβ”€β”¬ [email protected] 
  β”‚ └─┬ [email protected] 
  β”‚   └── [email protected] 
  β”œβ”€β”¬ [email protected] 
  β”‚ β”œβ”€β”€ [email protected] 
  β”‚ └── [email protected] 
  β”œβ”€β”€ [email protected] 
  β”œβ”€β”€ [email protected] 
  β”œβ”€β”¬ [email protected] 
  β”‚ └── [email protected] 
  β”œβ”€β”€ [email protected] 
  β”œβ”€β”¬ [email protected] 
  β”‚ β”œβ”€β”€ [email protected] 
  β”‚ └── [email protected] 
  β”œβ”€β”¬ [email protected] 
  β”‚ β”œβ”€β”¬ [email protected] 
  β”‚ β”‚ └── [email protected] 
  β”‚ β”œβ”€β”¬ [email protected] 
  β”‚ β”‚ └─┬ [email protected] 
  β”‚ β”‚   β”œβ”€β”¬ [email protected] 
  β”‚ β”‚   β”‚ └── [email protected] 
  β”‚ β”‚   β”œβ”€β”¬ [email protected] 
  β”‚ β”‚   β”‚ β”œβ”€β”€ [email protected] 
  β”‚ β”‚   β”‚ └── [email protected] 
  β”‚ β”‚   └─┬ [email protected] 
  β”‚ β”‚     β”œβ”€β”€ [email protected] 
  β”‚ β”‚     └── [email protected] 
  β”‚ β”œβ”€β”€ [email protected] 
  β”‚ β”œβ”€β”¬ [email protected] 
  β”‚ β”‚ └── [email protected] 
  β”‚ β”œβ”€β”€ [email protected] 
  β”‚ β”œβ”€β”€ [email protected] 
  β”‚ β”œβ”€β”¬ [email protected] 
  β”‚ β”‚ β”œβ”€β”¬ [email protected] 
  β”‚ β”‚ β”‚ └── [email protected] 
  β”‚ β”‚ └── [email protected] 
  β”‚ β”œβ”€β”¬ [email protected] 
  β”‚ β”‚ β”œβ”€β”€ [email protected] 
  β”‚ β”‚ β”œβ”€β”€ [email protected] 
  β”‚ β”‚ β”œβ”€β”€ [email protected] 
  β”‚ β”‚ β”œβ”€β”¬ [email protected] 
  β”‚ β”‚ β”‚ └── [email protected] 
  β”‚ β”‚ β”œβ”€β”€ [email protected] 
  β”‚ β”‚ β”œβ”€β”¬ [email protected] 
  β”‚ β”‚ β”‚ └── [email protected] 
  β”‚ β”‚ β”œβ”€β”¬ [email protected] 
  β”‚ β”‚ β”‚ β”œβ”€β”¬ [email protected] 
  β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected] 
  β”‚ β”‚ β”‚ β”‚ └─┬ [email protected] 
  β”‚ β”‚ β”‚ β”‚   └── [email protected] 
  β”‚ β”‚ β”‚ └── [email protected] 
  β”‚ β”‚ β”œβ”€β”¬ [email protected] 
  β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected] 
  β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected] 
  β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected] 
  β”‚ β”‚ β”‚ └── [email protected] 
  β”‚ β”‚ β”œβ”€β”¬ [email protected] 
  β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected] 
  β”‚ β”‚ β”‚ β”œβ”€β”¬ [email protected] 
  β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected] 
  β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected] 
  β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ [email protected] 
  β”‚ β”‚ β”‚ β”‚ └── [email protected] 
  β”‚ β”‚ β”‚ └─┬ [email protected] 
  β”‚ β”‚ β”‚   β”œβ”€β”€ [email protected] 
  β”‚ β”‚ β”‚   β”œβ”€β”€ [email protected] 
  β”‚ β”‚ β”‚   β”œβ”€β”€ [email protected] 
  β”‚ β”‚ β”‚   β”œβ”€β”¬ [email protected] 
  β”‚ β”‚ β”‚   β”‚ └── [email protected] 
  β”‚ β”‚ β”‚   β”œβ”€β”€ [email protected] 
  β”‚ β”‚ β”‚   β”œβ”€β”¬ [email protected] 
  β”‚ β”‚ β”‚   β”‚ └── [email protected] 
  β”‚ β”‚ β”‚   β”œβ”€β”€ [email protected] 
  β”‚ β”‚ β”‚   └── [email protected] 
  β”‚ β”‚ β”œβ”€β”€ [email protected] 
  β”‚ β”‚ β”œβ”€β”€ [email protected] 
  β”‚ β”‚ β”œβ”€β”¬ [email protected] 
  β”‚ β”‚ β”‚ └── [email protected] 
  β”‚ β”‚ β”œβ”€β”€ [email protected] 
  β”‚ β”‚ β”œβ”€β”€ [email protected] 
  β”‚ β”‚ β”œβ”€β”€ [email protected] 
  β”‚ β”‚ β”œβ”€β”€ [email protected] 
  β”‚ β”‚ β”œβ”€β”€ [email protected] 
  β”‚ β”‚ β”œβ”€β”¬ [email protected] 
  β”‚ β”‚ β”‚ └── [email protected] 
  β”‚ β”‚ β”œβ”€β”€ [email protected] 
  β”‚ β”‚ └── [email protected] 
  β”‚ β”œβ”€β”¬ [email protected] 
  β”‚ β”‚ β”œβ”€β”€ [email protected] 
  β”‚ β”‚ β”œβ”€β”¬ [email protected] 
  β”‚ β”‚ β”‚ └── [email protected] 
  β”‚ β”‚ β”œβ”€β”¬ [email protected] 
  β”‚ β”‚ β”‚ └── [email protected] 
  β”‚ β”‚ └─┬ [email protected] 
  β”‚ β”‚   β”œβ”€β”€ [email protected] 
  β”‚ β”‚   └── [email protected] 
  β”‚ β”œβ”€β”€ [email protected] 
  β”‚ β”œβ”€β”€ [email protected] 
  β”‚ └─┬ [email protected] 
  β”‚   β”œβ”€β”¬ [email protected] 
  β”‚   β”‚ └── [email protected] 
  β”‚   β”œβ”€β”€ [email protected] 
  β”‚   └── [email protected] 
  └─┬ [email protected] 
    β”œβ”€β”€ [email protected] 
    β”œβ”€β”€ [email protected] 
    β”œβ”€β”€ [email protected] 
    β”œβ”€β”€ [email protected] 
    └── [email protected] 

After I'm done it recognizes the voice commands but does not reply.

pi@raspberrypi:~/tjbot/recipes/conversation $ sudo nodejs conversation.js 
verbose: TJBot initializing microphone
verbose: TJBot initializing conversation service
verbose: TJBot initializing speech_to_text service
verbose: TJBot initializing text_to_speech service
info: Hello from TJBot! My name is Watson.
verbose: TJBot library version v1.3.0
You can ask me to introduce myself or tell you a joke.
Try saying, "Watson, please introduce yourself" or "Watson, who are you?"
You can also say, "Watson, tell me a joke!"
verbose: TJBot initializing microphone
info: TJBot heard: tell me a joke 
info: TJBot heard: who are you 
info: TJBot heard: who 
info: TJBot heard: hello 
info: TJBot heard: are you there 

Syntax error when running bootstrap

I ran the boostrap script on a freshinstall of rasbian and got the following errors

bash: line 169: syntax error near unexpected token 'fi'
bash: line 169: 'fi'

This is causing the script to end early and not completing the setup process.

Jumps

Seem to be having issues with TJ Bot returning jumps. When I set up a jump without a condition, Conversation service doesn't return the next piece of content in the dialogue, even though the conversation works within the conversation service Work-space.

Conversation payload quota

Hi,

I always got the following error message when using conversation.js, what does it mean ?

=== Watson Speech to Text : An Error has occurred =====
You may have exceeded your payload quota.
Error: Session closed. Reason: Payload exceeds the 104857600 bytes limit.
Press +C to exit.

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.