profile
viewpoint
TJBot ibmtjbot https://ibmtjbot.github.io A paper robot that you can bring to life using AI services

issue openedibmtjbot/tjbot

Error in the stt

When I try to talk with Tjbot, appear an error that say:

sudo node conversation.js verbose: TJBot initializing microphone verbose: TJBot initializing LED verbose: TJBot initializing servo motor on PIN 7 verbose: TJBot initializing Camera verbose: TJBot initializing assistant service verbose: TJBot initializing speech_to_text service verbose: TJBot initializing text_to_speech service verbose: TJBot initializing visual_recognition service info: Hello from TJBot! My name is Watson. verbose: TJBot library version v1.5.1 You can ask me to introduce myself or tell you a joke. Try saying, "Watson, please introduce yourself" or "Watson, what can you do?" You can also say, "Watson, tell me a joke!" verbose: TJBot initializing microphone

6175=101, 16176=146, 16177=99, 16178=169, 16179=101, 16180=149, 16181=99, 16182=174, 16183=101, 16184=148, 16185=99, 16186=175, 16187=101, 16188=146, 16189=99, 16190=169, 16191=101, 16192=147, 16193=99, 16194=168, 16195=101, 16196=148, 16197=99, 16198=175, 16199=101, 16200=149, 16201=99, 16202=174, 16203=101, 16204=147, 16205=99, 16206=168, 16207=101, 16208=146, 16209=99, 16210=169, 16211=101, 16212=104, 16213=156, 16214=83, 16215=154, 16216=148, 16217=99, 16218=175, 16219=101, 16220=148, 16221=99, 16222=175, 16223=101, 16224=150, 16225=99, 16226=173, 16227=101, 16228=147, 16229=99, 16230=168, 16231=101, 16232=151, 16233=99, 16234=172, 16235=101, 16236=148, 16237=99, 16238=175, 16239=101, 16240=151, 16241=99, 16242=172, 16243=101, 16244=105, 16245=156, 16246=82, 16247=154, 16248=150, 16249=99, 16250=173, 16251=101, 16252=104, 16253=156, 16254=83, 16255=154, 16256=147, 16257=99, 16258=168, 16259=101, 16260=146, 16261=99, 16262=169, 16263=101, 16264=151, 16265=99, 16266=172, 16267=101, 16268=147, 16269=99, 16270=168, 16271=101, 16272=147, 16273=99, 16274=168, 16275=101, 16276=149, 16277=99, 16278=174, 16279=101, 16280=147, 16281=99, 16282=168, 16283=101, 16284=146, 16285=99, 16286=169, 16287=101, 16288=148, 16289=99, 16290=175, 16291=101, 16292=150, 16293=99, 16294=173, 16295=101, 16296=148, 16297=99, 16298=175, 16299=101, 16300=146, 16301=99, 16302=169, 16303=101, 16304=106, 16305=156, 16306=81, 16307=154, 16308=150, 16309=99, 16310=173, 16311=101, 16312=104, 16313=156, 16314=83, 16315=154, 16316=105, 16317=156, 16318=82, 16319=154, 16320=108, 16321=156, 16322=87, 16323=154, 16324=151, 16325=99, 16326=172, 16327=101, 16328=151, 16329=99, 16330=172, 16331=101, 16332=151, 16333=99, 16334=172, 16335=101, 16336=147, 16337=99, 16338=168, 16339=101, 16340=150, 16341=99, 16342=173, 16343=101, 16344=151, 16345=99, 16346=172, 16347=101, 16348=147, 16349=99, 16350=168, 16351=101, 16352=148, 16353=99, 16354=175, 16355=101, 16356=147, 16357=99, 16358=168, 16359=101, 16360=105, 16361=156, 16362=82, 16363=154, 16364=149, 16365=99, 16366=174, 16367=101, 16368=106, 16369=156, 16370=81, 16371=154, 16372=151, 16373=99, 16374=172, 16375=101, 16376=148, 16377=99, 16378=175, 16379=101, 16380=150, 16381=99, 16382=173, 16383=101, 16384=151, 16385=99, 16386=172, 16387=101, 16388=150, 16389=99, 16390=173, 16391=101, encoding=buffer, isBuf=true, callback=function fragmentSentCallback(err) { if (err) { if (typeof cb === 'function') { // pass only the first error cb(err); cb = null; } return; } ++sentFragments; if ((sentFragments === numFragments) && (typeof cb === 'function')) { cb(); }

created time in a day

startedibmtjbot/tjbot

started time in 5 days

issue commentibmtjbot/tjbot

npm install issues

Alright.. tried this on my own Pi starting from a clean code checkout, using Node v9.11.2 and it works. I did get the same warnings during the node-gyp build of pigpio, but those aren't showstoppers. But I didn't get this:

Error: /home/pi/Desktop/tjbot/recipes/conversation/node_modules/sleep/build/Release/node_sleep.node: file too short

I suspect there might have been a build problem for the sleep module, and my recommendation would be to delete the node_modules directory and do another npm install. E.g.

rm -rf node_modules
npm install

Also, the use of sudo on the recipes is because root access is needed to control the LED. Both the Conversation and STT recipes use the LED, so both should be run with sudo.

Let me know how it goes.

mframos3

comment created time in 5 days

startedibmtjbot/tjbot

started time in 6 days

issue commentibmtjbot/tjbot

Error speech to Text npm install issue

Hm, I'm a little stumped too. Maybe try wiping out the node_modules folder and try again? I feel like I've run into this gyp error before and I think this is what I did to fix it, but it was a long time ago so my memory is a bit foggy.

rm -rf node_modules
npm install

Let me know how it goes.

jaha0308

comment created time in 6 days

fork dariosm/tjbotlib

Node.js library that abstracts basic functions for TJBot.

fork in 7 days

issue openedibmtjbot/tjbotlib

Left handed TJ

Hi there. I've recently assembled a TJ Bot, and after running somes recipes that uses the arm, I found that no matter how I place the servo, the movements are wrong. By swapping default servo positions I got it right. Default are:

TJBot.prototype._SERVO_ARM_UP = 1400;
TJBot.prototype._SERVO_ARM_DOWN = 2300;

Swapping BACK and DOWN solves the problem, since the arm is in the left side of the bot.

created time in 7 days

issue openedibmtjbot/tjbot

Error speech to Text npm install issue

pi@raspberrypi:~/tjbot/recipes/speech_to_text $ sudo npm instll sudo np(node:25395) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.

Usage: npm <command>

where <command> is one of: add-user, adduser, apihelp, author, bin, bugs, c, cache, completion, config, ddp, dedupe, deprecate, docs, edit, explore, faq, find, find-dupes, get, help, help-search, home, i, info, init, install, isntall, issues, la, link, list, ll, ln, login, ls, outdated, owner, pack, prefix, prune, publish, r, rb, rebuild, remove, repo, restart, rm, root, run-script, s, se, search, set, show, shrinkwrap, star, stars, start, stop, submodule, t, tag, test, tst, un, uninstall, unlink, unpublish, unstar, up, update, v, version, view, whoami

npm <cmd> -h quick help on <cmd> npm -l display full usage info npm faq commonly asked questions npm help <term> search for help on <term> npm help npm involved overview

Specify configs in the ini-formatted file: /root/.npmrc or on the command line via: npm <command> --key value Config info can be viewed via: npm help config

npm@1.4.21 /usr/share/npm pi@raspberrypi:~/tjbot/recipes/speech_to_text $ sudo npm install (node:25412) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead. npm WARN deprecated watson-developer-cloud@3.18.4: DeprecationWarning: watson-developer-cloud moved to ibm-watson. To get updates, use the new package.

sleep@5.2.4 install /home/pi/tjbot/recipes/speech_to_text/node_modules/tjbot/node_modules/sleep node-gyp rebuild


Traceback (most recent call last): File "/usr/share/node-gyp/gyp/gyp_main.py", line 9, in <module> load_entry_point('gyp==0.1', 'console_scripts', 'gyp')() File "/usr/lib/python2.7/dist-packages/gyp/init.py", line 545, in script_main return main(sys.argv[1:]) File "/usr/lib/python2.7/dist-packages/gyp/init.py", line 538, in main return gyp_main(args) File "/usr/lib/python2.7/dist-packages/gyp/init.py", line 502, in gyp_main 'cwd': os.getcwd(), OSError: [Errno 2] No such file or directory gyp ERR! configure error gyp ERR! stack Error: gyp failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:304:16) gyp ERR! stack at emitTwo (events.js:126:13) gyp ERR! stack at ChildProcess.emit (events.js:214:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12) gyp ERR! System Linux 4.14.98-v7+ gyp ERR! command "/usr/bin/node" "/usr/bin/node-gyp" "rebuild" gyp ERR! cwd /home/pi/tjbot/recipes/speech_to_text/node_modules/tjbot/node_modules/sleep gyp ERR! node -v v8.11.1 gyp ERR! node-gyp -v v3.4.0 gyp ERR! not ok npm ERR! Error: Method Not Allowed npm ERR! at errorResponse (/usr/share/npm/lib/cache/add-named.js:260:10) npm ERR! at /usr/share/npm/lib/cache/add-named.js:203:12 npm ERR! at saved (/usr/share/npm/node_modules/npm-registry-client/lib/get.js:167:7) npm ERR! at FSReqWrap.oncomplete (fs.js:135:15) npm ERR! If you need help, you may report this entire log, npm ERR! including the npm and node versions, at: npm ERR! http://github.com/npm/npm/issues npm ERR! System Linux 4.14.98-v7+ npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" npm ERR! cwd /home/pi/tjbot/recipes/speech_to_text npm ERR! node -v v8.11.1 npm ERR! npm -v 1.4.21 npm ERR! code E405 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

pigpio@0.4.0 install /home/pi/tjbot/recipes/speech_to_text/node_modules/tjbot/node_modules/pigpio node-gyp rebuild

I do not know what caused this problem.

created time in 7 days

issue commentibmtjbot/tjbot

npm install issues

Thanks for pointing out this issue. I'm not exactly sure what's going wrong here.. it looks like its failing when building the native libraries used by pigpio. I'm assuming you've done sudo apt-get install pigpio?

The update of the Watson SDKs from watson-developer-cloud to ibm-watson is new, but I don't think that's the reason you're getting this error.

I'll try to replicate this on my own TJBot when I get some more time. Stay tuned.

mframos3

comment created time in 7 days

issue openedibmtjbot/tjbot

npm install issues

Hi, I am having issues with node when running npm install. Also I have trouble running sudo node on the .js files of the recipes.

At first when using node versions 9 and above I encounter the following problem on every recipe:

npm WARN deprecated watson-developer-cloud@3.18.4: DeprecationWarning: watson-developer-cloud moved to ibm-watson. To get updates, use the new package.
> pigpio@0.4.0 install /home/pi/Desktop/tjbot/recipes/speech_to_text/node_modules/pigpio
> node-gyp rebuild

make: Entering directory '/home/pi/Desktop/tjbot/recipes/speech_to_text/node_modules/pigpio/build'
  CXX(target) Release/obj.target/pigpio/src/pigpio.o
In file included from ../../nan/nan.h:190:0,
                 from ../src/pigpio.cc:3:
../../nan/nan_maybe_43_inl.h: In function ‘Nan::Maybe<bool> Nan::ForceSet(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’:
../../nan/nan_maybe_43_inl.h:88:15: error: ‘class v8::Object’ has no member named ‘ForceSet’
   return obj->ForceSet(GetCurrentContext(), key, value, attribs);
               ^~~~~~~~
In file included from ../src/pigpio.cc:3:0:
../../nan/nan.h: In function ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’:
../../nan/nan.h:817:60: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
         v8::Isolate::GetCurrent(), target, func, argc, argv);
                                                            ^
In file included from ../../nan/nan.h:47:0,
                 from ../src/pigpio.cc:3:
/home/pi/.node-gyp/10.15.3/include/node/node.h:177:50: note: declared here
                 NODE_EXTERN v8::Local<v8::Value> MakeCallback(
                                                  ^
... (cut due to extension)

/home/pi/.node-gyp/10.15.3/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/pigpio.cc:316:45: warning: ‘uint32_t v8::Value::Uint32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
   unsigned frequency = info[1]->Uint32Value();
                                             ^
In file included from /home/pi/.node-gyp/10.15.3/include/node/v8.h:26:0,
                 from /home/pi/.node-gyp/10.15.3/include/node/node.h:63,
                 from ../../nan/nan.h:47,
                 from ../src/pigpio.cc:3:
/home/pi/.node-gyp/10.15.3/include/node/v8.h:2477:47: note: declared here
   V8_DEPRECATED("Use maybe version", uint32_t Uint32Value() const);
                                               ^
... (cut due to extension. Several V8_DEPRECATED messages were shown)


rpi_ws281x.target.mk:102: 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/Desktop/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/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 4.14.98-v7+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/Desktop/tjbot/recipes/speech_to_text/node_modules/rpi-ws281x-native
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 

> sleep@5.2.4 install /home/pi/Desktop/tjbot/recipes/speech_to_text/node_modules/sleep
> node-gyp rebuild

make: Entering directory '/home/pi/Desktop/tjbot/recipes/speech_to_text/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/Desktop/tjbot/recipes/speech_to_text/node_modules/sleep/build'

> websocket@1.0.28 install /home/pi/Desktop/tjbot/recipes/speech_to_text/node_modules/websocket
> (node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory '/home/pi/Desktop/tjbot/recipes/speech_to_text/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/Desktop/tjbot/recipes/speech_to_text/node_modules/websocket/build'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: pigpio@0.4.0 (node_modules/pigpio):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: pigpio@0.4.0 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: rpi-ws281x-native@0.8.2 (node_modules/rpi-ws281x-native):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: rpi-ws281x-native@0.8.2 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

added 123 packages from 174 contributors and audited 298 packages in 56.197s
found 0 vulnerabilities

Then I tried using node version 8. I ran npm install with similar V8_DEPRECATED messages. I also did run npm install ibm-watsondue to watson-developer-cloud being deprecated. After that I tried running node stt.js, node conversation.js. node stt.jssomehow works when not using sudo, but node conversation.js requires root-privileges as it is stated on the following message:

verbose: TJBot initializing microphone
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 servo motor on PIN 7
2019-01-31 14:09:46 initCheckPermitted:
+---------------------------------------------------------+
|Sorry, you don't have permission to run this program. |
|Try running as root, e.g. precede the command with sudo. |
+---------------------------------------------------------+

/home/pi/Desktop/tjbot/recipes/conversation/node_modules/pigpio/pigpio.js:11
pigpio.gpioInitialise();

Now by writing sudo before the command I get:

return process.dlopen(module, path.toNamespacedPath(filename));
^

Error: /home/pi/Desktop/tjbot/recipes/conversation/node_modules/sleep/build/Release/node_sleep.node: file too short
at Object.Module._extensions..node (internal/modules/cjs/loader.js:683:18)
at Module.load (internal/modules/cjs/loader.js:566:32)
at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
at Function.Module._load (internal/modules/cjs/loader.js:498:3)
at Module.require (internal/modules/cjs/loader.js:598:17)
at require (internal/modules/cjs/helpers.js:11:18)
at Object. (/home/pi/Desktop/tjbot/recipes/conversation/node_modules/sleep/index.js:1:75)
at Module._compile (internal/modules/cjs/loader.js:654:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
at Module.load (internal/modules/cjs/loader.js:566:32)
at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
at Function.Module._load (internal/modules/cjs/loader.js:498:3)
at Module.require (internal/modules/cjs/loader.js:598:17)
at require (internal/modules/cjs/helpers.js:11:18)
at Object. (/home/pi/Desktop/tjbot/recipes/conversation/node_modules/tjbot/lib/tjbot.js:24:15)
at Module._compile (internal/modules/cjs/loader.js:654:30)

I have in mind that lots of issues are related to this problem, but I have tried many of the solutions people shared but none of them really worked for me.

created time in 9 days

issue commentibmtjbot/tjbot

conversationjs -- error : linux-arm-57 missing ... have tried multiple versions of node and re- npm installing, always same error

@Dswag I have the same problem. How do I solve it? I've been having trouble with node versions in order to make TJBot work. Right now I'm using node v8.16 w/ npm v.6.4.1.

Dswag

comment created time in 10 days

issue commentibmtjbot/tjbot

Adding bash scripts to test Watson AI services from TJBOT

Updated code as per our discussion and pushed it. Thanks

mkhuthir

comment created time in 12 days

issue commentibmtjbot/tjbot

TTS service is failing when running tjbot-daemon & from command line

What's the error? (I just need the first line or two, node tends to spit out huge error messages)

VidhyaSiva

comment created time in 13 days

issue commentibmtjbot/tjbot

TTS service is failing when running tjbot-daemon & from command line

At a client event and suddenly getting error when running daemon or starting sentiment.js from command line. This was working this morning and just started failing

VidhyaSiva

comment created time in 13 days

Pull request review commentibmtjbot/tjbot

added bash_tests

+#!/bin/sh++# the following will send test.wav file to bluetooth speaker.+# you need to change the AMC address to match your actual bluetooth speaker MAC++aplay -D bluealsa:HCI=hci0,DEV=11:2C:33:A4:1E:5B,PROFILE=a2dp speech/test.wav

I will check if it is possible; otherwise I will add comment on how to identify your own MAC Address.

mkhuthir

comment created time in 13 days

Pull request review commentibmtjbot/tjbot

added bash_tests

+#!/bin/sh++# The following will translate two phrases, "Hello, world!" and "How are you?" from English to Spanish.++echo "Translate two phrases from English to Spanish"++if test "$#" -ne 1; then+    echo "Usage: $0 api-key"+else+	echo " Calling Watson Service API Using -> \"apikey:$1\""+	curl -X POST -u "apikey:$1" \+	--header "Content-Type: application/json" \+	--data "{\"text\": [\"Hello, world! \", \"How are you?\"], \"model_id\":\"en-es\"}" \+	"https://gateway-lon.watsonplatform.net/language-translator/api/v3/translate?version=2018-05-01"

Yes, this has nothing about zones. but it might be changed if a new WATSON API version is released. I will add comment to inform users to update gateway when required.

mkhuthir

comment created time in 13 days

Pull request review commentibmtjbot/tjbot

added bash_tests

+#!/bin/sh++# The following will translate two phrases, "Hello, world!" and "How are you?" from English to Spanish.++echo "Translate two phrases from English to Spanish"++if test "$#" -ne 1; then+    echo "Usage: $0 api-key"

Agreed. I will update it

mkhuthir

comment created time in 13 days

pull request commentibmtjbot/tjbot

added bash_tests

This is a really great contribution, thank you! I just have a few comments / questions, please take a look. Also, should this go inside bash_tests/, or should we put it in tests/ or maybe tests/watson?

Thanks, tests/ seems good. I will change as you suggested.

mkhuthir

comment created time in 13 days

Pull request review commentibmtjbot/tjbot

added bash_tests

+## Bash Scripts to test Watson AI Services++This folder contains bash scripts that are using **curl** command to call Watson APIs as explained on Watson getting started pages.++Test whether **curl** is installed. Run the following command on the command line. ++```bash+curl -V+```++If the output lists the curl version with SSL support, you are all set otherwise install it.++```bash+sudo apt install curl+```+To run a script, +* change to the folder where you have the scripts:+```bash+cd ~/TJBOT/bash_tests+```+* type **./** followed by the name of script file then space then your api-key for the related service++```bash+./tone_analyzer_4.sh pomy6gsgO4kmjtNa3eiuhg7haziujhyf0Ps8WxTrIom6

No this is a fake one just to make it clear for users. I will replace it with <insert Watson key here> as suggested.

mkhuthir

comment created time in 13 days

issue commentibmtjbot/tjbot

Adding bash scripts to test Watson AI services from TJBOT

👍 great idea, please see my comments in the PR.

mkhuthir

comment created time in 13 days

Pull request review commentibmtjbot/tjbot

added bash_tests

+#!/bin/sh++# The following will translate two phrases, "Hello, world!" and "How are you?" from English to Spanish.++echo "Translate two phrases from English to Spanish"++if test "$#" -ne 1; then+    echo "Usage: $0 api-key"+else+	echo " Calling Watson Service API Using -> \"apikey:$1\""+	curl -X POST -u "apikey:$1" \+	--header "Content-Type: application/json" \+	--data "{\"text\": [\"Hello, world! \", \"How are you?\"], \"model_id\":\"en-es\"}" \+	"https://gateway-lon.watsonplatform.net/language-translator/api/v3/translate?version=2018-05-01"

Is this gateway going to work for everyone? What if I create my service in another zone?

mkhuthir

comment created time in 13 days

Pull request review commentibmtjbot/tjbot

added bash_tests

+#!/bin/sh++# The following will translate two phrases, "Hello, world!" and "How are you?" from English to Spanish.++echo "Translate two phrases from English to Spanish"++if test "$#" -ne 1; then+    echo "Usage: $0 api-key"

should we use apikey in the help string to be consistent with what Watson services expect in the POST header? (also applies to all the other scripts…)

mkhuthir

comment created time in 13 days

Pull request review commentibmtjbot/tjbot

added bash_tests

+## Bash Scripts to test Watson AI Services++This folder contains bash scripts that are using **curl** command to call Watson APIs as explained on Watson getting started pages.++Test whether **curl** is installed. Run the following command on the command line. ++```bash+curl -V+```++If the output lists the curl version with SSL support, you are all set otherwise install it.++```bash+sudo apt install curl+```+To run a script, +* change to the folder where you have the scripts:+```bash+cd ~/TJBOT/bash_tests+```+* type **./** followed by the name of script file then space then your api-key for the related service++```bash+./tone_analyzer_4.sh pomy6gsgO4kmjtNa3eiuhg7haziujhyf0Ps8WxTrIom6

is this an actual Watson credential? it should be revoked if it is, not wise to commit to git. we may want to replace this with some placeholder text, e.g. <insert Watson key here>

mkhuthir

comment created time in 13 days

Pull request review commentibmtjbot/tjbot

added bash_tests

+#!/bin/sh++# the following will send test.wav file to bluetooth speaker.+# you need to change the AMC address to match your actual bluetooth speaker MAC++aplay -D bluealsa:HCI=hci0,DEV=11:2C:33:A4:1E:5B,PROFILE=a2dp speech/test.wav

any way not to hard-code the bluetooth address here? is there a way to pull it from somewhere? does it need to be specified or will aplay just do the right thing when the bluetooth speaker is connected? (I think it did the last time I tried…)

(the irony is that I didn't realize aplay could be invoked in this way, so this is actually really useful for me…)

mkhuthir

comment created time in 13 days

issue commentibmtjbot/tjbot

TJBot freezes after Sudo Node Conversation.js, followed by huge error message

Perhaps this will help. I've been working around this problem by using pi native eSpeak to speak long passages. With that, I still get the exception, but TJBot continues listening successfully after the exception.

The difference I see in the logs is when using eSpeak, this shows up in the log BEFORE the exception: debug: listening paused debug: microphone paused debug: listening resumed

When using Watson TTS, the 'debug listening resumed' shows up after the exception and the TJBot no longer response to voice input.

It seems that resuming listening before the exception is a key timing difference that relates to the problem.

I hope this provides a clue.

zacaintmyname

comment created time in 14 days

startedibmtjbot/tjbot

started time in 15 days

startedibmtjbot/tjbot

started time in 15 days

issue commentibmtjbot/tjbot

TJBot freezes after Sudo Node Conversation.js, followed by huge error message

Hi, same for me! The service was working like clockwork in Feb for me as well!

zacaintmyname

comment created time in 15 days

issue commentibmtjbot/tjbot

TJBot freezes after Sudo Node Conversation.js, followed by huge error message

I have getting the same error, changed the STT, TTS and conversation credentials to use password and username in config file, tried it vis swift playground and also Raspi command line. wondering what changed since Feb as this was working initially!!

zacaintmyname

comment created time in 15 days

PR opened ibmtjbot/tjbot

added bash_tests

(#140 ) Adding bash scripts to test Watson AI services without the use of TJBOT Node.JS Lib.

+477 -0

0 comment

27 changed files

pr created time in 17 days

issue openedibmtjbot/tjbot

Adding bash scripts to test Watson AI services from TJBOT

It will be great if we have bash scripts that will allow us to test Watson AI services directly without using TJBOT Node.JS Library. This will help in troubleshooting issues.

created time in 17 days

issue openedibmtjbot/tjbot

Workspace ID Problem?

The first time I ran the program it seemed to work just fine, though it wouldn't output to my speakers. So, I went back and reconfigured the speakers and now every time I run the chatbot I get an error about missing the workspace ID.

verbose: TJBot initializing microphone info: TJBot heard: Watson tell me a joke error: the assistant service returned an error. message=Missing required parameters: workspace_id, stack=Error: Missing required parameters: workspace_id at Object.getMissingParams (/home/pi/tjbot/recipes/conversation/node_modules/ibm-cloud-sdk-core/lib/helper.js:94:11) at AssistantV1.message (/home/pi/tjbot/recipes/conversation/node_modules/watson-developer-cloud/assistant/v1.js:95:50) at TJBot.converse (/home/pi/tjbot/recipes/conversation/node_modules/tjbot/lib/tjbot.js:719:21) at /home/pi/tjbot/recipes/conversation/conversation.js:53:12 at RecognizeStream.<anonymous> (/home/pi/tjbot/recipes/conversation/node_modules/tjbot/lib/tjbot.js:798:13) at RecognizeStream.emit (events.js:180:13) at addChunk (_stream_readable.js:274:12) at readableAddChunk (_stream_readable.js:261:11) at RecognizeStream.Readable.push (_stream_readable.js:218:10) at /home/pi/tjbot/recipes/conversation/node_modules/watson-developer-cloud/lib/recognize-stream.js:306:34 at Array.forEach (<anonymous>) at W3CWebSocket.socket.onmessage (/home/pi/tjbot/recipes/conversation/node_modules/watson-developer-cloud/lib/recognize-stream.js:299:34) at W3CWebSocket._dispatchEvent [as dispatchEvent] (/home/pi/tjbot/recipes/conversation/node_modules/yaeti/lib/EventTarget.js:107:17) at W3CWebSocket.onMessage (/home/pi/tjbot/recipes/conversation/node_modules/websocket/lib/W3CWebSocket.js:234:14) at WebSocketConnection.<anonymous> (/home/pi/tjbot/recipes/conversation/node_modules/websocket/lib/W3CWebSocket.js:205:19) at WebSocketConnection.emit (events.js:180:13)

I went into the Watson Assistant and created a sample customer care skill but now it crashes in a different way. Isn't this supposed to be able to answer a set of three or four questions (tell me a joke, etc.) straight out of the box?

created time in 17 days

issue openedibmtjbot/tjbot

I have 2 problems:

  1. problem's about the audio, in the raspberry pi the audio don't working,i replace the card in the step 3.

  2. I'm working with the workspace-sample.json, I imported the workspace on Watson assitant and copied the credencial and the ID in the code but, when I executed the command sudo node conversation.js, the answer's:

16376=173, 16377=3, 16378=155, 16379=98, 16380=165, 16381=3, 16382=147, 16383=98, 16384=167, 16385=3, 16386=145, 16387=98, 16388=166, 16389=3, 16390=144, 16391=98, encoding=buffer, isBuf=true, callback=function fragmentSentCallback(err) { if (err) { if (typeof cb === 'function') { // pass only the first error cb(err); cb = null; } return; } ++sentFragments; if ((sentFragments === numFragments) && (typeof cb === 'function')) { cb(); } }, 0=128, 1=254, 2=44, 3=72, 4=31, 5=67, 6=220, 7=236, 8=7, 9=67, 10=196, 11=236, 12=8, 13=67, 14=203, 15=236, 16=4, 17=67, 18=199, 19=236, 20=5, 21=67, 22=198, 23=236, 24=6, 25=67, 26=197, 27=236, 28=6, 29=67, 30=197, 31=236, 32=8, 33=67, 34=203, 35=236, 36=5, 37=67, 38=198, 39=236, 40=7, 41=67, 42=196, 43=236, 44=8, 45=67, 46=203, 47=236, 48=6, 49=67, 50=197, 51=236, 52=4, 53=67, 54=199, 55=236, 56=5, 57=67, 58=198, 59=236, 60=2, 61=67, 62=193, 63=236, 64=8, 65=67, 66=203, 67=236, 68=13, 69=67, 70=206, 71=236, 72=12, 73=67, 74=207, 75=236, 76=13, 77=67, 78=206, 79=236, 80=10, 81=67, 82=201, 83=236, 84=7, 85=67, 86=196, 87=236, 88=11, 89=67, 90=200, 91=236, 92=9, 93=67, 94=202, 95=236, 96=9, 97=67, 98=202, 99=236, 100=10, 101=67, 102=201, 103=236, 104=7, 105=67, 106=196, 107=236, 108=12, 109=67, 110=207, 111=236, 112=10, 113=67, 114=201, 115=236, 116=10, 117=67, 118=201, 119=236, 120=11, 121=67, 122=200, 123=236, 124=7, 125=67, 126=196, 127=236, 128=11, 129=67, 130=200, 131=236, 132=11, 133=67, 134=200, 135=236, 136=12, 137=67, 138=207, 139=236, 140=14, 141=67, 142=205, 143=236, 144=10, 145=67, 146=201, 147=236, 148=12, 149=67, 150=207, 151=236, 152=8, 153=67, 154=203, 155=236, 156=14, 157=67, 158=205, 159=236, 160=13, 161=67, 162=206, 163=236, 164=14, 165=67, 166=205, 167=236, 168=12, 169=67, 170=207, 171=236, 172=12, 173=67, 174=207, 175=236, 176=13, 177=67, 178=206, 179=236, 180=14, 181=67, 182=205, 183=236, 184=12, 185=67, 186=207, 187=236, 188=11, 189=67, 190=200, 191=236, 192=12, 193=67, 194=207, 195=236, 196=11, 197=67, 198=200, 199=236, 200=10, 201=67, 202=201, 203=236, 204=14, 205=67, 206=205, 207=236, 208=13, 209=67, 210=206, 211=236, 212=7, 213=67, 214=196, 215=236, 216=8, 217=67, 218=203, 219=236, 220=14, 221=67, 222=205, 223=236, 224=6, 225=67, 226=197, 227=236, 228=12, 229=67, 230=207, 231=236, 232=13, 233=67, 234=206, 235=236, 236=12, 237=67, 238=207, 239=236, 240=8, 241=67, 242=203, 243=236, 244=6, 245=67, 246=197, 247=236, 248=13, 249=67, 250=206, 251=236, 252=14, 253=67, 254=205, 255=236, 256=13, 257=67, 258=206, 259=236, 260=15, 261=67, 262=204, 263=236, 264=11, 265=67, 266=200, 267=236, 268=12, 269=67, 270=207, 271=236, 272=14, 273=67, 274=205, 275=236, 276=15, 277=67, 278=204, 279=236, 280=14, 281=67, 282=205, 283=236, 284=16, 285=67, 286=211, 287=236, 288=17, 289=67, 290=210, 291=236, 292=16, 293=67, 294=211, 295=236, 296=16, 297=67, 298=211, 299=236, 300=13, 301=67, 302=206, 303=236, 304=15, 305=67, 306=204, 307=236, 308=20, 309=67, 310=215, 311=236, 312=17, 313=67, 314=210, 315=236, 316=18, 317=67, 318=209, 319=236, 320=18, 321=67, 322=209, 323=236, 324=19, 325=67, 326=208, 327=236, 328=20, 329=67, 330=215, 331=236, 332=16, 333=67, 334=211, 335=236, 336=20, 337=67, 338=215, 339=236, 340=17, 341=67, 342=210, 343=236, 344=16, 345=67, 346=211, 347=236, 348=16, 349=67, 350=211, 351=236, 352=14, 353=67, 354=205, 355=236, 356=18, 357=67, 358=209, 359=236, 360=15, 361=67, 362=204, 363=236, 364=17, 365=67, 366=210, 367=236, 368=19, 369=67, 370=208, 371=236, 372=17, 373=67, 374=210, 375=236, 376=17, 377=67, 378=210, 379=236, 380=23, 381=67, 382=212, 383=236, 384=20, 385=67, 386=215, 387=236, 388=22, 389=67, 390=213, 391=236, 392=19, 393=67, 394=208, 395=236, 396=21, 397=67, 398=214, 399=236, 400=20, 401=67, 402=215, 403=236, 404=14, 405=67, 406=205, 407=236, 408=21, 409=67, 410=214, 411=236, 412=15, 413=67, 414=204, 415=236, 416=17, 417=67, 418=210, 419=236, 420=21, 421=67, 422=214, 423=236, 424=20, 425=67, 426=215, 427=236, 428=19, 429=67, 430=208, 431=236, 432=22, 433=67, 434=213, 435=236, 436=21, 437=67, 438=214, 439=236, 440=25, 441=67, 442=218, 443=236, 444=18, 445=67, 446=209, 447=236, 448=17, 449=67, 450=210, 451=236, 452=23, 453=67, 454=212, 455=236, 456=19, 457=67, 458=208, 459=236, 460=23, 461=67, 462=212, 463=236, 464=21, 465=67, 466=214, 467=236, 468=23, 469=67, 470=212, 471=236, 472=24, 473=67, 474=219, 475=236, 476=25, 477=67, 478=218, 479=236, 480=25, 481=67, 482=218, 483=236, 484=24, 485=67, 486=219, 487=236, 488=18, 489=67, 490=209, 491=236, 492=25, 493=67, 494=218, 495=236, 496=22, 497=67, 498=213, 499=236, 500=22, 501=67, 502=213, 503=236, 504=22, 505=67, 506=213, 507=236, 508=21, 509=67, 510=214, 511=236, 512=22, 513=67, 514=213, 515=236, 516=25, 517=67, 518=218, 519=236, 520=21, 521=67, 522=214, 523=236, 524=23, 525=67, 526=212, 527=236, 528=25, 529=67, 530=218, 531=236, 532=22, 533=67, 534=213, 535=236, 536=24, 537=67, 538=219, 539=236, 540=27, 541=67, 542=216, 543=236, 544=23, 545=67, 546=212, 547=236, 548=24, 549=67, 550=219, 551=236, 552=24, 553=67, 554=219, 555=236, 556=20, 557=67, 558=215, 559=236, 560=23, 561=67, 562=212, 563=236, 564=23, 565=67, 566=212, 567=236, 568=27, 569=67, 570=216, 571=236, 572=23, 573=67, 574=212, 575=236, 576=27, 577=67, 578=216, 579=236, 580=26, 581=67, 582=217, 583=236, 584=27, 585=67, 586=216, 587=236, 588=27, 589=67, 590=216, 591=236, 592=29, 593=67, 594=222, 595=236, 596=27, 597=67, 598=216, 599=236, 600=30, 601=67, 602=221, 603=236, 604=26, 605=67, 606=217, 607=236, 608=26, 609=67, 610=217, 611=236, 612=28, 613=67, 614=223, 615=236, 616=29, 617=67, 618=222, 619=236, 620=26, 621=67, 622=217, 623=236, 624=25, 625=67, 626=218, 627=236, 628=30, 629=67, 630=221, 631=236, 632=27, 633=67, 634=216, 635=236, 636=25, 637=67, 638=218, 639=236, 640=29, 641=67, 642=222, 643=236, 644=31, 645=67, 646=220, 647=236, 648=29, 649=67, 650=222, 651=236, 652=27, 653=67, 654=216, 655=236, 656=27, 657=67, 658=216, 659=236, 660=26, 661=67, 662=217, 663=236, 664=26, 665=67, 666=217, 667=236, 668=27, 669=67, 670=216, 671=236, 672=24, 673=67, 674=219, 675=236, 676=25, 677=67, 678=218, 679=236, 680=23, 681=67, 682=212, 683=236, 684=25, 685=67, 686=218, 687=236, 688=25, 689=67, 690=218, 691=236, 692=24, 693=67, 694=219, 695=236, 696=24, 697=67, 698=219, 699=236, 700=23, 701=67, 702=212, 703=236, 704=21, 705=67, 706=214, 707=236, 708=24, 709=67, 710=219, 711=236, 712=25, 713=67, 714=218, 715=236, 716=28, 717=67, 718=223, 719=236, 720=30, 721=67, 722=221, 723=236, 724=27, 725=67, 726=216, 727=236, 728=29, 729=67, 730=222, 731=236, 732=224, 733=188, 734=35, 735=19, 736=31, 737=67, 738=220, 739=236, 740=26, 741=67, 742=217, 743=236, 744=26, 745=67, 746=217, 747=236, 748=28, 749=67, 750=223, 751=236, 752=24, 753=67, 754=219, 755=236, 756=226, 757=188, 758=33, 759=19, 760=30, 761=67, 762=221, 763=236, 764=29, 765=67, 766=222, 767=236, 768=226, 769=188, 770=33, 771=19, 772=25, 773=67, 774=218, 775=236, 776=23, 777=67, 778=212, 779=236, 780=27, 781=67, 782=216, 783=236, 784=30, 785=67, 786=221, 787=236, 788=30, 789=67, 790=221, 791=236, 792=30, 793=67, 794=221, 795=236, 796=28, 797=67, 798=223, 799=236, 800=31, 801=67, 802=220, 803=236, 804=27, 805=67, 806=216, 807=236, 808=28, 809=67, 810=223, 811=236, 812=27, 813=67, 814=216, 815=236, 816=25, 817=67, 818=218, 819=236, 820=28, 821=67, 822=223, 823=236, 824=28, 825=67, 826=223, 827=236, 828=24, 829=67, 830=219, 831=236, 832=30, 833=67, 834=221, 835=236, 836=29, 837=67, 838=222, 839=236, 840=29, 841=67, 842=222, 843=236, 844=27, 845=67, 846=216, 847=236, 848=30, 849=67, 850=221, 851=236, 852=28, 853=67, 854=223, 855=236, 856=29, 857=67, 858=222, 859=236, 860=26, 861=67, 862=217, 863=236, 864=225, 865=188, 866=34, 867=19, 868=29, 869=67, 870=222, 871=236, 872=225, 873=188, 874=34, 875=19, 876=226, 877=188, 878=33, 879=19, 880=31, 881=67, 882=220, 883=236, 884=228, 885=188, 886=39, 887=19, 888=224, 889=188, 890=35, 891=19, 892=224, 893=188, 894=35, 895=19, 896=30, 897=67, 898=221, 899=236, 900=30, 901=67, 902=221, 903=236, 904=27, 905=67, 906=216, 907=236, 908=31, 909=67, 910=220, 911=236, 912=30, 913=67, 914=221, 915=236, 916=26, 917=67, 918=217, 919=236, 920=28, 921=67, 922=223, 923=236, 924=224, 925=188, 926=35, 927=19, 928=226, 929=188, 930=33, 931=19, 932=224, 933=188, 934=35, 935=19, 936=31, 937=67, 938=220, 939=236, 940=30, 941=67, 942=221, 943=236, 944=29, 945=67, 946=222, 947=236, 948=29, 949=67, 950=222, 951=236, 952=30, 953=67, 954=221, 955=236, 956=30, 957=67, 958=221, 959=236, 960=31, 961=67, 962=220, 963=236, 964=224, 965=188, 966=35, 967=19, 968=27, 969=67, 970=216, 971=236, 972=30, 973=67, 974=221, 975=236, 976=31, 977=67, 978=220, 979=236, 980=224, 981=188, 982=35, 983=19, 984=28, 985=67, 986=223, 987=236, 988=226, 989=188, 990=33, 991=19, 992=26, 993=67, 994=217, 995=236, 996=31, 997=67, 998=220, 999=236, 1000=31, 1001=67, 1002=220, 1003=236, 1004=30, 1005=67, 1006=221, 1007=236, 1008=226, 1009=188, 1010=33, 1011=19, 1012=224, 1013=188, 1014=35, 1015=19, 1016=31, 1017=67, 1018=220, 1019=236, 1020=30, 1021=67, 1022=221, 1023=236, 1024=30, 1025=67, 1026=221, 1027=236, 1028=28, 1029=67, 1030=223, 1031=236, 1032=31, 1033=67, 1034=220, 1035=236, 1036=28, 1037=67, 1038=223, 1039=236, 1040=30, 1041=67, 1042=221, 1043=236, 1044=28, 1045=67, 1046=223, 1047=236, 1048=31, 1049=67, 1050=220, 1051=236, 1052=29, 1053=67, 1054=222, 1055=236, 1056=27, 1057=67, 1058=216, 1059=236, 1060=26, 1061=67, 1062=217, 1063=236, 1064=28, 1065=67, 1066=223, 1067=236, 1068=30, 1069=67, 1070=221, 1071=236, 1072=224, 1073=188, 1074=35, 1075=19, 1076=29, 1077=67, 1078=222, 1079=236, 1080=29, 1081=67, 1082=222, 1083=236, 1084=225, 1085=188, 1086=34, 1087=19, 1088=30, 1089=67, 1090=221, 1091=236, 1092=29, 1093=67, 1094=222, 1095=236, 1096=224, 1097=188, 1098=35, 1099=19, 1100=225, 1101=188, 1102=34, 1103=19, 1104=227, 1105=188, 1106=32, 1107=19, 1108=29, 1109=67, 1110=222, 1111=236, 1112=229, 1113=188, 1114=38, 1115=19, 1116=225, 1117=188, 1118=34, 1119=19, 1120=31, 1121=67, 1122=220, 1123=236, 1124=226, 1125=188, 1126=33, 1127=19, 1128=224, 1129=188, 1130=35, 1131=19, 1132=225, 1133=188, 1134=34, 1135=19, 1136=30, 1137=67, 1138=221, 1139=236, 1140=227, 1141=188, 1142=32, 1143=19, 1144=226, 1145=188, 1146=33, 1147=19, 1148=30, 1149=67, 1150=221, 1151=236, 1152=224, 1153=188, 1154=35, 1155=19, 1156=30, 1157=67, 1158=221, 1159=236, 1160=226, 1161=188, 1162=33, 1163=19, 1164=28, 1165=67, 1166=223, 1167=236, 1168=28, 1169=67, 1170=223, 1171=236, 1172=29, 1173=67, 1174=222, 1175=236, 1176=224, 1177=188, 1178=35, 1179=19, 1180=29, 1181=67, 1182=222, 1183=236, 1184=224, 1185=188, 1186=35, 1187=19, 1188=224, 1189=188, 1190=35, 1191=19, 1192=227, 1193=188, 1194=32, 1195=19, 1196=226, 1197=188, 1198=33, 1199=19, 1200=30, 1201=67, 1202=221, 1203=236, 1204=225, 1205=188, 1206=34, 1207=19, 1208=29, 1209=67, 1210=222, 1211=236, 1212=225, 1213=188, 1214=34, 1215=19, 1216=31, 1217=67, 1218=220, 1219=236, 1220=28, 1221=67, 1222=223, 1223=236, 1224=224, 1225=188, 1226=35, 1227=19, 1228=226, 1229=188, 1230=33, 1231=19, 1232=224, 1233=188, 1234=35, 1235=19, 1236=31, 12^C2019-04-29 15:35:12 sigHandler: Unhandled signal 2, terminating

In summary, the problems're that the audio don't working and the exit's not the exit that I'm waiting

If somebody can help me, please, send me a email to cdceballor@eafit.edu.co or saturnoadv@gmail.com

Thanks

created time in 21 days

startedibmtjbot/tjbot

started time in a month

startedibmtjbot/tjbot

started time in a month

issue commentibmtjbot/tjbot

TJBot freezes after Sudo Node Conversation.js, followed by huge error message

Actually, I see now that my listen inactivity timeout setting didn't get picked up properly. But now I did set it correctly (I think). But it made things worse. Upon the first attempt to listen I get this:
verbose: TJBot initializing microphone WARNING: createRecognizeStream() was renamed to recognizeUsingWebSocket(). Support for createRecognizeStream() will be removed in the next major release debug: microphone started error: the speech_to_text service returned an error. message=WebSocket connection error, stack=WebSocket connection error: WebSocket connection error at W3CWebSocket.socket.onerror (/home/pi/Desktop/tjbot/recipes/conversation/node_modules/watson-developer-cloud/lib/recognize-stream.js:197:23) at W3CWebSocket._dispatchEvent [as dispatchEvent] (/home/pi/Desktop/tjbot/recipes/conversation/node_modules/yaeti/lib/EventTarget.js:107:17) at W3CWebSocket.onConnectFailed (/home/pi/Desktop/tjbot/recipes/conversation/node_modules/websocket/lib/W3CWebSocket.js:217:14) at WebSocketClient.<anonymous> (/home/pi/Desktop/tjbot/recipes/conversation/node_modules/websocket/lib/W3CWebSocket.js:59:25) at emitOne (events.js:96:13) at WebSocketClient.emit (events.js:188:7) at WebSocketClient.failHandshake (/home/pi/Desktop/tjbot/recipes/conversation/node_modules/websocket/lib/WebSocketClient.js:326:10) at ClientRequest.<anonymous> (/home/pi/Desktop/tjbot/recipes/conversation/node_modules/websocket/lib/WebSocketClient.js:265:18) at emitOne (events.js:96:13) at ClientRequest.emit (events.js:188:7) at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:478:21) at HTTPParser.parserOnHeadersComplete (_http_common.js:99:23) at TLSSocket.socketOnData (_http_client.js:367:20) at emitOne (events.js:96:13) at TLSSocket.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:176:18), name=WebSocket connection error, type=error, isTrusted=false, _yaeti=true, , addEventListener=function _addEventListener(type, newListener) { var listenersType, .... If I remove this: listen: { inactivityTimeout: -1 } the connect works again. So that time out value must be causing that connect exception.

zacaintmyname

comment created time in a month

issue commentibmtjbot/tjbot

TJBot freezes after Sudo Node Conversation.js, followed by huge error message

I reported this issue last year. I'm still having it when speaking long messages. Setting the listen inactivityTimeout to -1 did not help. In particular it is fatal when the exception occurs while tjbot is trying to speak. Here are some relevant messages from my debug log: info: TJBot heard: tell me a joke about computers callback from tj.listen ... my code then starts telling a very long joke, not one of the canned jokes.
verbose: TJBot speaking with voice en-US_MichaelV2Voice debug: wrote audio stream to temp file /tmp/tjbot119320-2555-1edluiu.5dh0ejyvi verbose: TJBot speaking: .... followed by...

debug: listening paused debug: microphone paused debug: Playing audio with parameters: filename=/tmp/tjbot119320-2555-1edluiu.5dh0ejyvi, gain=100, debug=true, player=aplay, device=plughw:0,0 ========= { filename: '/tmp/tjbot119320-2555-1edluiu.5dh0ejyvi', gain: 100, debug: true, player: 'aplay', device: 'plughw:0,0' } error: the speech_to_text service returned an error. message=Session timed out., stack=Error: Session timed out. at emitError (/home/pi/Desktop/tjbot/recipes/conversation/node_modules/watson-developer-cloud/lib/recognize-stream.js:232:23) at W3CWebSocket.socket.onmessage (/home/pi/Desktop/tjbot/recipes/conversation/node_modules/watson-developer-cloud/lib/recognize-stream.js:257:17) at W3CWebSocket._dispatchEvent [as dispatchEvent] (/home/pi/Desktop/tjbot/recipes/conversation/node_modules/yaeti/lib/EventTarget.js:107:17) at W3CWebSocket.onMessage (/home/pi/Desktop/tjbot/recipes/conversation/node_modules/websocket/lib/W3CWebSocket.js:234:14) at WebSocketConnection.<anonymous> (/home/pi/Desktop/tjbot/recipes/conversation/node_modules/websocket/lib/W3CWebSocket.js:205:19) at emitOne (events.js:96:13) at WebSocketConnection.emit (events.js:188:7) .... and a long stack trace.

Why is tjbot listening at all at that point? 1) its already processing a 'return' from listening 2) its speaking and listening is paused and the mic is paused.

With all that said, if it would recover from the exception and start listening again after speaking, all would be well. After the stack trace this is in the log: debug: listening stopped verbose: TJBot initializing microphone debug: microphone deviceID set plughw:1,0 WARNING: createRecognizeStream() was renamed to recognizeUsingWebSocket(). Support for createRecognizeStream() will be removed in the next major release debug: microphone started debug: audio playback finished debug: listening resumed

However, tjbot no longer responds to verbal commands. It does not appear to be listening.

I'm not sure how to debug further.

zacaintmyname

comment created time in a month

startedibmtjbot/tjbot

started time in a month

startedibmtjbot/tjbot

started time in a month

startedibmtjbot/tjbot

started time in a month

issue commentibmtjbot/tjbot

TJBot freezes after Sudo Node Conversation.js, followed by huge error message

error: the speech_to_text service returned an error. message=Session timed out., stack=Error: Session timed out.

Looks like the connection with Watson Speech to Text timed out. This can happen when the microphone is silent for long periods of time.

Try adding inactivityTimeout: -1 to your tjbot config in the config.js file:

exports.tjConfig = {
    log: {
        level: 'verbose'
    },
    listen: {
        inactivityTimeout: -1
    }
};

Technical details here: https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-text-input#timeouts

zacaintmyname

comment created time in a month

issue openedibmtjbot/tjbot

TJBot freezes after Sudo Node Conversation.js, followed by huge error message

Hi team,

My credentials are updated, my speaker plays music as well. But now I just cant seem to get the last command to work! Experiencing the same issue for conversation.js and stt.js.

pi@DoctorBroccoliJunior:~/tjbot/recipes/conversation $ sudo node conversation.jsverbose: TJBot initializing microphone verbose: TJBot initializing LED verbose: TJBot initializing servo motor on PIN 7 verbose: TJBot initializing assistant service verbose: TJBot initializing speech_to_text service verbose: TJBot initializing text_to_speech service verbose: TJBot initializing visual_recognition service info: Hello from TJBot! My name is Watson. verbose: TJBot library version v1.5.1 You can ask me to introduce myself or tell you a joke. Try saying, "Watson, please introduce yourself" or "Watson, what can you do?" You can also say, "Watson, tell me a joke!" verbose: TJBot initializing microphone error: the speech_to_text service returned an error. message=Session timed out., stack=Error: Session timed out. at emitError (/home/pi/tjbot/recipes/conversation/node_modules/watson-developer-cloud/lib/recognize-stream.js:247:23) at W3CWebSocket.socket.onmessage (/home/pi/tjbot/recipes/conversation/node_modules/watson-developer-cloud/lib/recognize-stream.js:272:17) at W3CWebSocket._dispatchEvent [as dispatchEvent] (/home/pi/tjbot/recipes/conversation/node_modules/yaeti/lib/EventTarget.js:107:17) at W3CWebSocket.onMessage (/home/pi/tjbot/recipes/conversation/node_modules/websocket/lib/W3CWebSocket.js:234:14) at WebSocketConnection.<anonymous> (/home/pi/tjbot/recipes/conversation/node_modules/websocket/lib/W3CWebSocket.js:205:19) at WebSocketConnection.emit (events.js:180:13) at WebSocketConnection.processFrame (/home/pi/tjbot/recipes/conversation/node_modules/websocket/lib/WebSocketConnection.js:554:26) at /home/pi/tjbot/recipes/conversation/node_modules/websocket/lib/WebSocketConnection.js:323:40 at process._tickCallback (internal/process/next_tick.js:176:11), type=message, isTrusted=false, _yaeti=true, data={ "error": "Session timed out." }, , 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://gateway-syd.watsonplatform.net/speech-to-text/api/v1/recognize?model=en-US_BroadbandModel, _readyState=1, _protocol=undefined, _extensions=[], _bufferedAmount=0, _binaryType=arraybuffer, _debug=function debug() { // disabled? if (!debug.enabled) return;

var self = debug;

// set `diff` timestamp
var curr = +new Date();
var ms = curr - (prevTime || curr);
self.diff = ms;
self.prev = prevTime;
self.curr = curr;
prevTime = curr;

// turn the `arguments` into a proper Array
var args = new Array(arguments.length);
for (var i = 0; i < args.length; i++) {
  args[i] = arguments[i];
}

args[0] = exports.coerce(args[0]);

if ('string' !== typeof args[0]) {
  // anything else let's inspect with %O
  args.unshift('%O');
}

// apply any `formatters` transformations
var index = 0;
args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {
  // if we encounter an escaped % then don't increase the array index
  if (match === '%%') return match;
  index++;
  var formatter = exports.formatters[format];
  if ('function' === typeof formatter) {
    var val = args[index];
    match = formatter.call(self, val);

    // now we need to remove `args[index]` since it's inlined in the `format`
    args.splice(index, 1);
    index--;
  }
  return match;
});

// apply env-specific formatting (colors, etc.)
exports.formatArgs.call(self, args);

var logFn = debug.log || exports.log || console.log.bind(console);
logFn.apply(self, args);

}, newListener=function (ev) { if (ev === 'ping'){ this._pingListenerCount++; } }, removeListener=function (ev) { if (ev === 'ping') { this._pingListenerCount--; } }, close=function (code, reason) { onClose.call(self, code, reason); }, message=function (msg) { onMessage.call(self, msg); }, _eventsCount=4, _maxListeners=undefined, _pingListenerCount=0, maxReceivedFrameSize=1048576, maxReceivedMessageSize=8388608, fragmentOutgoingMessages=true, fragmentationThreshold=16384, webSocketVersion=13, assembleFragments=true, disableNagleAlgorithm=true, closeTimeout=5000, rejectUnauthorized=true, pipe=false, , singleUse=true, isServer=false, requestCert=true, rejectUnauthorized=true, session=undefined, NPNProtocols=undefined, ALPNProtocols=undefined, requestOCSP=undefined, _secureEstablished=true, _securePending=false, _newSessionPending=false, _controlReleased=true, _SNICallback=null, servername=gateway-syd.watsonplatform.net, npnProtocol=false, alpnProtocol=false, authorized=true, authorizationError=null, encrypted=true, close=[function onSocketCloseDestroySSL() { // Make sure we are not doing it on OpenSSL's stack setImmediate(destroySSL, this); this[kRes] = null; }, function () { [native code] }, function () { [native code] }], finish=function onSocketFinish() { // If still connecting - defer handling 'finish' until 'connect' will happen if (this.connecting) { debug('osF: not yet connected'); return this.once('connect', onSocketFinish); }

debug('onSocketFinish'); if (!this.readable || this._readableState.ended) { debug('oSF: ended, destroy', this._readableState); return this.destroy(); }

debug('oSF: not ended, call shutdown()');

// otherwise, just shutdown, or destroy() if not possible if (!this._handle || !this._handle.shutdown) return this.destroy();

var err = defaultTriggerAsyncIdScope( this[async_id_symbol], shutdownSocket, this, afterShutdown );

if (err) return this.destroy(errnoException(err, 'shutdown')); }, end=[function onReadableStreamEnd() { maybeDestroy(this); }, function () { [native code] }], secure=function onConnectSecure() { const options = this[kConnectOptions];

// Check the size of DHE parameter above minimum requirement // specified in options. const ekeyinfo = this.getEphemeralKeyInfo(); if (ekeyinfo.type === 'DH' && ekeyinfo.size < options.minDHSize) { const err = new errors.Error('ERR_TLS_DH_PARAM_SIZE', ekeyinfo.size); this.emit('error', err); this.destroy(); return; }

let verifyError = this._handle.verifyError();

// Verify that server's identity matches it's certificate's names // Unless server has resumed our existing session if (!verifyError && !this.isSessionReused()) { const hostname = options.servername || options.host || (options.socket && options.socket._host) || 'localhost'; const cert = this.getPeerCertificate(true); verifyError = options.checkServerIdentity(hostname, cert); }

if (verifyError) { this.authorized = false; this.authorizationError = verifyError.code || verifyError.message;

if (options.rejectUnauthorized) {
  this.destroy(verifyError);
  return;
} else {
  this.emit('secureConnect');
}

} else { this.authorized = true; this.emit('secureConnect'); }

// Uncork incoming data this.removeListener('end', onConnectEnd); }, error=function () { [native code] }, drain=function () { [native code] }, pause=function () { [native code] }, resume=function () { [native code] }, data=function () { [native code] }, _eventsCount=9, connecting=false, _hadError=false, reading=true, $ref=$["raw"]["target"]["_connection"]["socket"], onread=null, onconnection=null, _parentWrap=undefined, $ref=$["raw"]["target"]["_connection"]["socket"]["_tlsOptions"]["secureContext"], reading=true, $ref=$["raw"]["target"]["_connection"]["socket"], onread=function onread(nread, buffer) { var handle = this; var self = handle.owner; assert(handle === self._handle, 'handle != self._handle');

self._unrefTimer();

debug('onread', nread);

if (nread > 0) { debug('got data');

// read success.
// In theory (and in practice) calling readStop right now
// will prevent this from being called again until _read() gets
// called again.

// Optimization: emit the original buffer with end points
var ret = self.push(buffer);

if (handle.reading && !ret) {
  handle.reading = false;
  debug('readStop');
  var err = handle.readStop();
  if (err)
    self.destroy(errnoException(err, 'read'));
}
return;

}

// if we didn't get any bytes, that doesn't necessarily mean EOF. // wait for the next one. if (nread === 0) { debug('not any data, keep waiting'); return; }

// Error, possibly EOF. if (nread !== UV_EOF) { return self.destroy(errnoException(nread, 'read')); }

debug('EOF');

// push a null to signal the end of data. // Do it before maybeDestroy for correct order of events: // end -> close self.push(null); self.read(0);

if (!self.allowHalfOpen) { self.write = writeAfterFIN; self.destroySoon(); }

// internal end event so that we know that the actual socket // is no longer readable, and we can start the shutdown // procedure. No need to wait for all the data to be consumed. self.emit('_socketEnd'); }, onhandshakestart=() => {}, onhandshakedone=function () { [native code] }, onocspresponse=function onocspresponse(resp) { this.owner.emit('OCSPResponse', resp); }, onerror=function onerror(err) { const owner = this.owner;

if (owner._writableState.errorEmitted) return;

// Destroy socket if error happened before handshake's finish if (!owner._secureEstablished) { // When handshake fails control is not yet released, // so self._tlsError will return null instead of actual error owner.destroy(err); } else if (owner._tlsOptions.isServer && owner._rejectUnauthorized && /peer did not return a certificate/.test(err.message)) { // Ignore server's authorization errors owner.destroy(); } else { // Throw error owner._emitTLSError(err); }

owner._writableState.errorEmitted = true; }, _parent=null, _host=gateway-syd.watsonplatform.net, objectMode=false, highWaterMark=16384, head=null, tail=null, length=0, length=0, pipes=null, pipesCount=0, flowing=true, ended=false, endEmitted=false, reading=true, sync=false, needReadable=true, emittedReadable=false, readableListening=false, resumeScheduled=false, destroyed=false, defaultEncoding=utf8, awaitDrain=0, readingMore=true, decoder=null, encoding=null, readable=true, _maxListeners=undefined, objectMode=false, highWaterMark=16384, finalCalled=false, needDrain=false, ending=false, ended=false, finished=false, destroyed=false, decodeStrings=false, defaultEncoding=utf8, length=0, writing=false, corked=0, sync=false, bufferProcessing=false, onwrite=function () { [native code] }, writecb=null, writelen=0, bufferedRequest=null, lastBufferedRequest=null, pendingcb=0, prefinished=false, errorEmitted=false, bufferedRequestCount=0, next=null, entry=null, finish=function () { [native code] }, entry=null, finish=function () { [native code] }, writable=true, _bytesDispatched=6268995, _sockname=null, _pendingData=null, _pendingEncoding=, allowHalfOpen=false, server=undefined, _server=null, $ref=$["raw"]["target"]["_connection"]["socket"]["_handle"], _requestCert=true, _rejectUnauthorized=true, parser=null, _httpMessage=null, address=23.74.234.6, family=IPv4, port=443, _idleNext=null, _idlePrev=null, _idleTimeout=-1, protocol=undefined, $ref=$["raw"]["target"]["_extensions"], remoteAddress=23.74.234.6, closeReasonCode=-1, closeDescription=null, closeEventEmitted=false, maskOutgoingPackets=true, 0=178, 1=8, 2=12, 3=186, 0=129, 1=36, 2=184, 3=2, 4=232, 5=201, 6=184, 7=2, 8=112, 9=204, , _eventsCount=0, _maxListeners=undefined, encoding=undefined, length=0, write=function (buf) { if (!head.buffer) { head.buffer = buf; last = head; } else { last.next = { next : null, buffer : buf }; last = last.next; } length += buf.length; self.emit('write', buf); return true; }, end=function (buf) { if (Buffer.isBuffer(buf)) self.write(buf); }, push=function () { var args = [].concat.apply([], arguments); args.forEach(self.write); return self; }, forEach=function (fn) { if (!head.buffer) return bufferAllocUnsafe(0);

    if (head.buffer.length - offset <= 0) return self;
    var firstBuf = head.buffer.slice(offset);
    
    var b = { buffer : firstBuf, next : head.next };
    
    while (b && b.buffer) {
        var r = fn(b.buffer);
        if (r) break;
        b = b.next;
    }
    
    return self;
}, join=function (start, end) {
    if (!head.buffer) return bufferAllocUnsafe(0);
    if (start == undefined) start = 0;
    if (end == undefined) end = self.length;
    
    var big = bufferAllocUnsafe(end - start);
    var ix = 0;
    self.forEach(function (buffer) {
        if (start < (ix + buffer.length) && ix < end) {
            // at least partially contained in the range
            buffer.copy(
                big,
                Math.max(0, ix - start),
                Math.max(0, start - ix),
                Math.min(buffer.length, end - ix)
            );
        }
        ix += buffer.length;
        if (ix > end) return true; // stop processing past end
    });
    
    return big;
}, joinInto=function (targetBuffer, targetStart, sourceStart, sourceEnd) {
    if (!head.buffer) return new bufferAllocUnsafe(0);
    if (sourceStart == undefined) sourceStart = 0;
    if (sourceEnd == undefined) sourceEnd = self.length;
    
    var big = targetBuffer;
    if (big.length - targetStart < sourceEnd - sourceStart) {
        throw new Error("Insufficient space available in target Buffer.");
    }
    var ix = 0;
    self.forEach(function (buffer) {
        if (sourceStart < (ix + buffer.length) && ix < sourceEnd) {
            // at least partially contained in the range
            buffer.copy(
                big,
                Math.max(targetStart, targetStart + ix - sourceStart),
                Math.max(0, sourceStart - ix),
                Math.min(buffer.length, sourceEnd - ix)
            );
        }
        ix += buffer.length;
        if (ix > sourceEnd) return true; // stop processing past end
    });
    
    return big;
}, advance=function (n) {
    offset += n;
    length -= n;
    while (head.buffer && offset >= head.buffer.length) {
        offset -= head.buffer.length;
        head = head.next
            ? head.next
            : { buffer : null, next : null }
        ;
    }
    if (head.buffer === null) last = { next : null, buffer : null };
    self.emit('advance', n);
    return self;
}, take=function (n, encoding) {
    if (n == undefined) n = self.length;
    else if (typeof n !== 'number') {
        encoding = n;
        n = self.length;
    }
    var b = head;
    if (!encoding) encoding = self.encoding;
    if (encoding) {
        var acc = '';
        self.forEach(function (buffer) {
            if (n <= 0) return true;
            acc += buffer.toString(
                encoding, 0, Math.min(n,buffer.length)
            );
            n -= buffer.length;
        });
        return acc;
    } else {
        // If no 'encoding' is specified, then return a Buffer.
        return self.join(0, n);
    }
}, toString=function () {
    return self.take('binary');
}, $ref=$["raw"]["target"]["_connection"]["maskBytes"], $ref=$["raw"]["target"]["_connection"]["frameHeader"], $ref=$["raw"]["target"]["_connection"]["config"], maxReceivedFrameSize=1048576, protocolError=false, frameTooLarge=false, invalidCloseFrameLength=false, parseState=1, closeStatus=-1, fragmentationSize=0, frameQueue=[], connected=true, state=open, waitingForCloseResponse=false, receivedEnd=false, closeTimeout=5000, assembleFragments=true, maxReceivedMessageSize=8388608, outputBufferFull=false, inputPaused=false, receivedDataHandler=function () { [native code] }, _closeTimerHandler=function () { [native code] }, webSocketVersion=13, connect=function (connection) {
    onConnect.call(self, connection);
}, connectFailed=function () {
    onConnectFailed.call(self);
}, _eventsCount=2, _maxListeners=undefined, $ref=$["raw"]["target"]["_connection"]["config"], _req=null, protocols=[], origin=null, protocol=wss:, slashes=true, auth=null, host=gateway-syd.watsonplatform.net, port=443, hostname=gateway-syd.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://gateway-syd.watsonplatform.net/speech-to-text/api/v1/recognize?model=en-US_BroadbandModel, secure=true, base64nonce=kDo6nuIoFQ9rjZfKZg/b6Q==, $ref=$["raw"]["target"]["_connection"]["socket"], objectMode=false, highWaterMark=16384, head=null, tail=null, length=0, length=0, pipes=null, pipesCount=0, flowing=null, ended=true, endEmitted=false, reading=false, sync=true, needReadable=false, emittedReadable=true, readableListening=false, resumeScheduled=false, destroyed=false, defaultEncoding=utf8, awaitDrain=0, readingMore=true, decoder=null, encoding=null, readable=true, , _eventsCount=0, _maxListeners=undefined, $ref=$["raw"]["target"]["_connection"]["socket"], $ref=$["raw"]["target"]["_connection"]["socket"], httpVersionMajor=1, httpVersionMinor=1, httpVersion=1.1, complete=true, content-type=application/octet-stream, sec-websocket-accept=g6E/eXl9mUC0shYnvrN8SSWfSnA=, x-global-transaction-id=3599eb03f63737f005bdb603ebc9198b, x-dp-watson-tran-id=3599eb03f63737f005bdb603ebc9198b, date=Tue, 09 Apr 2019 04:13:24 GMT, upgrade=websocket, connection=Upgrade, rawHeaders=[Content-Type, application/octet-stream, Sec-Websocket-Accept, g6E/eXl9mUC0shYnvrN8SSWfSnA=, x-global-transaction-id, 3599eb03f63737f005bdb603ebc9198b, X-DP-Watson-Tran-ID, 3599eb03f63737f005bdb603ebc9198b, Date, Tue, 09 Apr 2019 04:13:24 GMT, Upgrade, websocket, Connection, Upgrade], , rawTrailers=[], upgrade=true, url=, method=null, statusCode=101, statusMessage=Switching Protocols, $ref=$["raw"]["target"]["_connection"]["socket"], _consuming=false, _dumped=false, firstDataChunk=null, onerror=function (event) {
        self.listening = false;
        var err = new Error('WebSocket connection error');
        err.name = RecognizeStream.WEBSOCKET_CONNECTION_ERROR;
        err['event'] = event;
        self.emit('error', err);
        self.push(null);
    }, onopen=function () {
        self.sendJSON(openingMessage);
        /**
         * emitted once the WebSocket connection has been established
         * @event RecognizeStream#open
         */
        self.emit('open');
    }, 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);
        }
        var data;
        try {
            data = JSON.parse(frame.data);
        }
        catch (jsonEx) {
            return emitError('Invalid JSON received from service:', frame, jsonEx);
        }
        /**
         * Emit any messages received over the wire, mainly used for debugging.
         *
         * @event RecognizeStream#message
         * @param {Object} message - frame object with a data attribute that's either a string or a Buffer/TypedArray
         * @param {Object} [data] - parsed JSON object (if possible);
         */
        self.emit('message', frame, data);
        if (data.error) {
            emitError(data.error, frame);
        }
        else 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 = false;
                socket.close();
            }
            else {
                self.listening = true;
                /**
                 * Emitted when the Watson Service indicates readiness to transcribe audio. Any audio sent before this point will be buffered until now.
                 * @event RecognizeStream#listening
                 */
                self.emit('listening');
            }
        }
        else {
            if (options.readableObjectMode) {
                /**
                 * Object with interim or final results, possibly including confidence scores, alternatives, and word timing.
                 * @event RecognizeStream#data
                 * @param {Object} data
                 */
                self.push(data);
            }
            else if (Array.isArray(data.results)) {
                data.results.forEach(function (result) {
                    if (result.final && result.alternatives) {
                        /**
                         * Finalized text
                         * @event RecognizeStream#data
                         * @param {String} transcript
                         */
                        self.push(result.alternatives[0].transcript, 'utf8');
                    }
                });
            }
        }
    }, cancelable=true, stopImmediatePropagation=function () {
		stopImmediatePropagation = true;
	}

verbose: TJBot initializing microphone ^Z2019-04-09 12:14:02 sigHandler: Unhandled signal 20, terminating

created time in a month

issue closedibmtjbot/tjbot

How to update tjConfig?

Hi Team,

I came across this and I have the exact same problems as EsthervanLuit initially faced. How do you update "tjConfig".

Sorry new to coding, hope you do not mind!


Hi @EsthervanLuit ,

I do agree with you that its an audio problem (the app uses deviceid 0,0, but should use 2,0). With the tjbot library, you can specify the speakerDeviceId .. and in your case, this should be set to 2,0. I would say we update tjConfig to

var tjConfig = {
    verboseLogging: true,
    speakerDeviceId: 'plughw:2,0',
    microphoneDeviceId: 'plughw:1,0',
        robot: {
                name: 'TJ',
                homophones: ['DJ','Deejay','Teejay'],
                gender: 'female'
    },
speak: {
    language: 'en-US', // see TJBot.prototype.languages.speak
    voice: undefined, // use a specific voice; if undefined, a voice is chosen based on robot.gender and speak.language
    speakerDeviceId: "plughw:2,0" // plugged-in USB card 1, device 0; see aplay -l for a list of playback devices
  }
};

For the full list of parameters you can configure with the TJBot library, please see here. (If the above does not work, one final thing you might have to do is roll back changes to you might have made to alsa.conf and asound.conf)

-V.

Originally posted by @victordibia in https://github.com/ibmtjbot/tjbot/issues/63#issuecomment-331750652

closed time in a month

zacaintmyname

issue commentibmtjbot/tjbot

internal/modules/cjs/loader.js:605

works by you?? @fghafour

fghafour

comment created time in 2 months

issue commentibmtjbot/tjbot

internal/modules/cjs/loader.js:605

One thing I would suggest is to make sure to reload your PI OS. Your IBM cloud apis, just delete them and re-instantiate them again. User your new api keys and make sure to not install multiple versions node.js. At the time I was doing installation the required version was 9.

fghafour

comment created time in 2 months

issue commentibmtjbot/tjbot

internal/modules/cjs/loader.js:605

Hello I would like too reopen that topic because i have te same problem. After reboot of the tjbot he answers me once then it freezes. After i finished it with Ctrl-c and try it again without rebooting it makes weird sound answer.

fghafour

comment created time in 2 months

startedibmtjbot/tjbot

started time in 2 months

startedibmtjbot/tjbot

started time in 2 months

issue commentibmtjbot/tjbot

Using normal RGB Led

TJBOT library is using rpi_ws281x library to control color and brightness of the Neopixel LED through BCM 18 (PWM0) pin on Raspberry PI. You will not be able to use a simple LED or RGB LED to replace the Neopixel unless you change TJBOT library to support the LED or RGB LED instead of Neopixel.

gqferreira

comment created time in 2 months

startedibmtjbot/tjbot

started time in 2 months

issue closedibmtjbot/tjbot

Error in Conversation Recipe

After entering my credentials in my config.js file, I tried running the conversation recipe using sudo node conversation.js but I keep getting this error:

verbose: TJBot initializing microphone
verbose: TJBot initializing LED
verbose: TJBot initializing servo motor on PIN 7
verbose: TJBot initializing assistant service
verbose: TJBot initializing speech_to_text service
verbose: TJBot initializing text_to_speech service
verbose: TJBot initializing tone_analyzer service
verbose: TJBot initializing visual_recognition service
/home/pi/Documents/tjbot/recipes/conversation/node_modules/tjbot/lib/tjbot.js:542
            throw new Error(
            ^

Error: Missing authentication credentials for tone_analyzer service: username/password or apikey are required.
    at TJBot._createServiceAPI (/home/pi/Documents/tjbot/recipes/conversation/node_modules/tjbot/lib/tjbot.js:542:19)
    at new TJBot (/home/pi/Documents/tjbot/recipes/conversation/node_modules/tjbot/lib/tjbot.js:116:18)
    at Object.<anonymous> (/home/pi/Documents/tjbot/recipes/conversation/conversation.js:36:10)
    at Module._compile (internal/modules/cjs/loader.js:654:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
    at Module.load (internal/modules/cjs/loader.js:566:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
    at Function.Module._load (internal/modules/cjs/loader.js:498:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:695:10)
    at startup (internal/bootstrap/node.js:201:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:516:3)

closed time in 2 months

ryanomor

issue commentibmtjbot/tjbot

Error in Conversation Recipe

Thanks @jweisz. It works now after I added the "visual_recognition" credentials to my config.js file. I figured I wouldn't need those credentials if my TJBot doesn't use a camera. Guess that's not the case.

ryanomor

comment created time in 2 months

issue commentibmtjbot/tjbot

Error in Conversation Recipe

So I would need to get "visual_recognition" credentials even if my TJBot doesn't use a camera?

ryanomor

comment created time in 2 months

issue commentibmtjbot/tjbot

Apps.twitter.com has been sunset

If you figure this out, I'd appreciate a pull request to update the recipe for Twitter's new API. ;)

ryanomor

comment created time in 2 months

issue commentibmtjbot/tjbot

Error in Conversation Recipe

Hm. On the surface it looks like you didn't put in your authentication credentials for the tone analyzer service:

Error: Missing authentication credentials for tone_analyzer service: username/password or apikey are required.

But that said, the Conversation recipe doesn't require tone analyzer. It does require visual recognition, and when I look at the line numbers referenced in the error, it is following the logic of when the visual recognition credentials are missing. But the error says "tone_analyzer" and not "visual_recognition", which is weird.

My 1st guess is that "tone_analyzer" was just a typo and it really should have said "visual_recognition", in which case, please check your config.js file to make sure you have the visual recognition credentials in place.

My 2nd guess is that you might be using an older version of tjbotlib (which would also explain the typo). You can do an `rm -rf node_modules && npm install`` to install the latest.

Let me know how it goes.

ryanomor

comment created time in 2 months

issue commentibmtjbot/tjbot

Error in Conversation Recipe

It looks like you didn't put in credentials for the tone analyzer service:

Error: Missing authentication credentials for tone_analyzer service: username/password or apikey are required.

ryanomor

comment created time in 2 months

push eventibmtjbot/tjbot

Maryam Ashoori

commit sha c188d57fb8ac20d1f1068ced92c01b874e3aa292

Update README.md updated the link to twitter apps

view details

push time in 2 months

issue commentibmtjbot/tjbot

Apps.twitter.com has been sunset

I have, but not sure how to go about getting the keys/secrets from there.

ryanomor

comment created time in 2 months

issue commentibmtjbot/tjbot

Apps.twitter.com has been sunset

Did you try https://developer.twitter.com/en/apps?

ryanomor

comment created time in 2 months

issue openedibmtjbot/tjbot

Apps.twitter.com has been sunset

I was reading through the sentiment_analysis recipe and noticed that the link to get the consumer key, consumer secret, access token key, and access token secret has been sunset by Twitter. How should we get these keys/secrets now?

created time in 2 months

issue openedibmtjbot/tjbot

Error in Conversation Recipe

After entering my credentials in my config.js file, I tried running the conversation recipe using sudo node conversation.js but I keep getting this error:

verbose: TJBot initializing microphone
verbose: TJBot initializing LED
verbose: TJBot initializing servo motor on PIN 7
verbose: TJBot initializing assistant service
verbose: TJBot initializing speech_to_text service
verbose: TJBot initializing text_to_speech service
verbose: TJBot initializing tone_analyzer service
verbose: TJBot initializing visual_recognition service
/home/pi/Documents/tjbot/recipes/conversation/node_modules/tjbot/lib/tjbot.js:542
            throw new Error(
            ^

Error: Missing authentication credentials for tone_analyzer service: username/password or apikey are required.
    at TJBot._createServiceAPI (/home/pi/Documents/tjbot/recipes/conversation/node_modules/tjbot/lib/tjbot.js:542:19)
    at new TJBot (/home/pi/Documents/tjbot/recipes/conversation/node_modules/tjbot/lib/tjbot.js:116:18)
    at Object.<anonymous> (/home/pi/Documents/tjbot/recipes/conversation/conversation.js:36:10)
    at Module._compile (internal/modules/cjs/loader.js:654:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
    at Module.load (internal/modules/cjs/loader.js:566:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
    at Function.Module._load (internal/modules/cjs/loader.js:498:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:695:10)
    at startup (internal/bootstrap/node.js:201:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:516:3)

created time in 2 months

issue commentibmtjbot/tjbot

Suggestion: Support For Newer Version of Node/JavaScript

I would suggest creating a recipe/example that uses babel-cli with certain configurations. What do you think?

Mattemyo

comment created time in 2 months

startedibmtjbot/tjbot

started time in 2 months

issue commentibmtjbot/tjbot

How to update tjConfig?

@maryamashoori Thank you for the reply!

But $ cp config.default.js config.js brings me to:

// set up TJBot's configuration

exports.tjConfig = {
    log: {   level: 'verbose'    },
    robot: {   name: 'tee jay bot'  }
};

I was looking for the var tjconfig part. var tjConfig = { verboseLogging: true, speakerDeviceId: 'plughw:2,0', microphoneDeviceId: 'plughw:1,0', robot: { name: 'TJ', homophones: ['DJ','Deejay','Teejay'], gender: 'female' }, speak: { language: 'en-US', // see TJBot.prototype.languages.speak voice: undefined, // use a specific voice; if undefined, a voice is chosen based on robot.gender and speak.language speakerDeviceId: "plughw:2,0" // plugged-in USB card 1, device 0; see aplay -l for a list of playback devices } };

Is it the same? Thanks for helping!

zacaintmyname

comment created time in 2 months

startedibmtjbot/tjbot

started time in 2 months

issue commentibmtjbot/tjbot

How to update tjConfig?

Hi there, you need to make a copy of the default configuration file and update the text. Here is how to do it from the command line:

$ cp config.default.js config.js

and then $ nano config.js

zacaintmyname

comment created time in 2 months

issue openedibmtjbot/tjbot

How to update tjConfig?

Hi Team,

I came across this and I have the exact same problems as EsthervanLuit initially faced. How do you update "tjConfig".

Sorry new to coding, hope you do not mind!


Hi @EsthervanLuit ,

I do agree with you that its an audio problem (the app uses deviceid 0,0, but should use 2,0). With the tjbot library, you can specify the speakerDeviceId .. and in your case, this should be set to 2,0. I would say we update tjConfig to

var tjConfig = {
    verboseLogging: true,
    speakerDeviceId: 'plughw:2,0',
    microphoneDeviceId: 'plughw:1,0',
        robot: {
                name: 'TJ',
                homophones: ['DJ','Deejay','Teejay'],
                gender: 'female'
    },
speak: {
    language: 'en-US', // see TJBot.prototype.languages.speak
    voice: undefined, // use a specific voice; if undefined, a voice is chosen based on robot.gender and speak.language
    speakerDeviceId: "plughw:2,0" // plugged-in USB card 1, device 0; see aplay -l for a list of playback devices
  }
};

For the full list of parameters you can configure with the TJBot library, please see here. (If the above does not work, one final thing you might have to do is roll back changes to you might have made to alsa.conf and asound.conf)

-V.

Originally posted by @victordibia in https://github.com/ibmtjbot/tjbot/issues/63#issuecomment-331750652

created time in 2 months

issue commentibmtjbot/tjbot

TJbot is thinking - but not talking back to me

Hi, May I know how to get into editing those configs?

------------------From Above-------------------------------

Hi @EsthervanLuit ,

I do agree with you that its an audio problem (the app uses deviceid 0,0, but should use 2,0). With the tjbot library, you can specify the speakerDeviceId .. and in your case, this should be set to 2,0. I would say we update tjConfig to

var tjConfig = { verboseLogging: true, speakerDeviceId: 'plughw:2,0', microphoneDeviceId: 'plughw:1,0', robot: { name: 'TJ', homophones: ['DJ','Deejay','Teejay'], gender: 'female' }, speak: { language: 'en-US', // see TJBot.prototype.languages.speak voice: undefined, // use a specific voice; if undefined, a voice is chosen based on robot.gender and speak.language speakerDeviceId: "plughw:2,0" // plugged-in USB card 1, device 0; see aplay -l for a list of playback devices } }; For the full list of parameters you can configure with the TJBot library, please see here. (If the above does not work, one final thing you might have to do is roll back changes to you might have made to alsa.conf and asound.conf)

-V.

EsthervanLuit

comment created time in 2 months

issue closedibmtjbot/tjbot

Unable to complete "Build A Talking Robot"

Hi, I am new to this field. I was playing around with TJBot and I have run into a problem.

Would you be able to let me know what went wrong?

Am using the tutorial from https://github.com/ibmtjbot/tjbot/blob/master/recipes/conversation/README.md.

Below is what I experience when I verbally ask the bot "Watson, introduce yourself". info: TJBot heard: Watson introduce yourself error: the assistant service returned an error. message=Missing required parameters: workspace_id, stack=Error: Missing required parameters: workspace_id at Object.getMissingParams (/home/pi/Desktop/tjbot/recipes/conversation/node_modules/watson-developer-cloud/lib/helper.js:95:11) at AssistantV1.message (/home/pi/Desktop/tjbot/recipes/conversation/node_modules/watson-developer-cloud/assistant/v1.js:96:38) at TJBot.converse (/home/pi/Desktop/tjbot/recipes/conversation/node_modules/tjbot/lib/tjbot.js:719:21) at /home/pi/Desktop/tjbot/recipes/conversation/conversation.js:53:12 at RecognizeStream.<anonymous> (/home/pi/Desktop/tjbot/recipes/conversation/node_modules/tjbot/lib/tjbot.js:798:13) at RecognizeStream.emit (events.js:180:13) at addChunk (_stream_readable.js:274:12) at readableAddChunk (_stream_readable.js:261:11) at RecognizeStream.Readable.push (_stream_readable.js:218:10) at /home/pi/Desktop/tjbot/recipes/conversation/node_modules/watson-developer-cloud/lib/recognize-stream.js:306:34 at Array.forEach (<anonymous>) at W3CWebSocket.socket.onmessage (/home/pi/Desktop/tjbot/recipes/conversation/node_modules/watson-developer-cloud/lib/recognize-stream.js:299:34) at W3CWebSocket._dispatchEvent [as dispatchEvent] (/home/pi/Desktop/tjbot/recipes/conversation/node_modules/yaeti/lib/EventTarget.js:107:17) at W3CWebSocket.onMessage (/home/pi/Desktop/tjbot/recipes/conversation/node_modules/websocket/lib/W3CWebSocket.js:234:14) at WebSocketConnection.<anonymous> (/home/pi/Desktop/tjbot/recipes/conversation/node_modules/websocket/lib/W3CWebSocket.js:205:19) at WebSocketConnection.emit (events.js:180:13)

Will anyone be able to help me out? Thank you!

closed time in 2 months

zacaintmyname

issue commentibmtjbot/tjbot

Unable to complete "Build A Talking Robot"

Sorry managed to troubleshoot this already! Works now! Mainly uncommenting and commenting the user/apikey.

Thank you!

zacaintmyname

comment created time in 2 months

issue commentibmtjbot/tjbot

Instructables directions for altering attention word and gender no longer work.

This worked for me, but no gender

// set up TJBot's configuration exports.tjConfig = { log: { level: 'verbose' }, // Changing the robot name will change the attention word robot: { name: 'ibm' } };

ljmwaugh

comment created time in 2 months

issue commentibmtjbot/tjbot

Unable to complete "Build A Talking Robot"

Hi Sir,

Thank you for the reply. Indeed I have added the workspace ID (which I believe is a 'skill' under Watson Assistant)

Unfortunately I am now facing another error prompt.

verbose: TJBot initializing microphone verbose: TJBot initializing LED verbose: TJBot initializing servo motor on PIN 7 2019-03-12 16:23:58 initInitialise: Can't lock /var/run/pigpio.pid /home/pi/Desktop/tjbot/recipes/conversation/node_modules/pigpio/pigpio.js:11 pigpio.gpioInitialise(); ^

Error: pigpio error -1 in gpioInitialise at initializePigpio (/home/pi/Desktop/tjbot/recipes/conversation/node_modules/pigpio/pigpio.js:11:12) at new Gpio (/home/pi/Desktop/tjbot/recipes/conversation/node_modules/pigpio/pigpio.js:25:3) at TJBot._setupServo (/home/pi/Desktop/tjbot/recipes/conversation/node_modules/tjbot/lib/tjbot.js:304:19) at TJBot.<anonymous> (/home/pi/Desktop/tjbot/recipes/conversation/node_modules/tjbot/lib/tjbot.js:71:18) at Array.forEach (<anonymous>) at new TJBot (/home/pi/Desktop/tjbot/recipes/conversation/node_modules/tjbot/lib/tjbot.js:56:14) at Object.<anonymous> (/home/pi/Desktop/tjbot/recipes/conversation/conversation.js:36:10) at Module._compile (internal/modules/cjs/loader.js:654:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10) at Module.load (internal/modules/cjs/loader.js:566:32) at tryModuleLoad (internal/modules/cjs/loader.js:506:12) at Function.Module._load (internal/modules/cjs/loader.js:498:3) at Function.Module.runMain (internal/modules/cjs/loader.js:695:10) at startup (internal/bootstrap/node.js:201:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:516:3)

zacaintmyname

comment created time in 2 months

issue commentibmtjbot/tjbot

Suggestion: Support For Newer Version of Node/JavaScript

Is there something we would need to change with the TJBot library to enable you to do this?

Mattemyo

comment created time in 2 months

issue closedibmtjbot/tjbot

crash after several successful runs

I followed the instructions in tjbot and tried the speach-to-text. It ran successfully. However, after about 10 runs, I got error message at initialization. After the crash, I could not find my / . I had to reboot my system by unplugging the power, and the file system came back again. But "sudo node stt.js" would crash. I have to rerun the set up (bootstrap and npm install) and sometimes my stt.js became empty. Then I can run my TJBot again.

closed time in 2 months

chentong319

issue commentibmtjbot/tjbot

crash after several successful runs

I'm not sure why this would be happening. Could it be a bad SD card? It doesn't seem like the TJBot software would cause the RPi to crash in the way you describe. Please re-open the issue if you think this is a tjbot-specific problem.

chentong319

comment created time in 2 months

issue closedibmtjbot/tjbot

internal/modules/cjs/loader.js:605

I am trying to test the first speech to text recipe and have installed node 11 node -v v11.7.0

I have run the command npm install in that folder When i run node stt.js, I get the following error: tjbot/recipes/speech_to_text $ node stt.js internal/modules/cjs/loader.js:605 throw err; ^

Error: Cannot find module './config' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:603:15) at Function.Module._load (internal/modules/cjs/loader.js:529:25) at Module.require (internal/modules/cjs/loader.js:657:17) at require (internal/modules/cjs/helpers.js:20:18) at Object.<anonymous> (/home/pi/Desktop/tjbot/recipes/speech_to_text/stt.js:18:14) at Module._compile (internal/modules/cjs/loader.js:721:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10) at Module.load (internal/modules/cjs/loader.js:620:32) at tryModuleLoad (internal/modules/cjs/loader.js:560:12) at Function.Module._load (internal/modules/cjs/loader.js:552:3) at Function.Module.runMain (internal/modules/cjs/loader.js:774:12) at executeUserCode (internal/bootstrap/node.js:499:15) at startMainThreadExecution (internal/bootstrap/node.js:436:3)

I am unable to find the config folder that it is looking for.

closed time in 2 months

fghafour

issue commentibmtjbot/tjbot

internal/modules/cjs/loader.js:605

Closing due to inactivity

fghafour

comment created time in 2 months

issue closedibmtjbot/tjbot

tj.speak results in TypeError: Cannot read property 'pipe' of undefined

I have a problem with tj.speak. It throws an TypeError. My code:

var TJBot = require('tjbot');
var config = require('./config');
var credentials = config.credentials;
var hardware = [ 'speaker'];

var tjConfig = {
    log: {
        level: 'verbose'
    },
    speak: {
	speakerDeviceId: 'plughw:1,0' 
    }
};

var tj = new TJBot(hardware, tjConfig, credentials);

var welcome="Hello World";
console.log(welcome);
tj.speak(welcome);

This results in:

verbose: TJBot initializing language_translator 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.5.1
Hello World
verbose: TJBot speaking with voice en-US_MichaelVoice
/home/pi/Desktop/tjbot/recipes/speech_to_text/node_modules/tjbot/lib/tjbot.js:1263
                .pipe(fs.createWriteStream(info.path))
                ^

TypeError: Cannot read property 'pipe' of undefined
    at /home/pi/Desktop/tjbot/recipes/speech_to_text/node_modules/tjbot/lib/tjbot.js:1263:17
    at /home/pi/Desktop/tjbot/recipes/speech_to_text/node_modules/temp/lib/temp.js:252:7
    at FSReqWrap.oncomplete (fs.js:153:20)

When I use the following code it works perfect:

var TJBot = require('tjbot');
var config = require('./config');
var credentials = config.credentials;
var hardware = [ 'speaker'];

var tjConfig = {
    log: {
        level: 'verbose'
    },
   speak: {
   	speakerDeviceId: 'plughw:1,0' 
       }

};

var tj = new TJBot(hardware, tjConfig, credentials);

var welcome="Hello World";
console.log(welcome);

var sound = '/usr/share/sounds/alsa/Front_Center.wav';
tj.play(sound).then(function(){
tj.speak(welcome);});

and the related output:

verbose: TJBot initializing language_translator 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.5.1
Hello World
========= { filename: '/usr/share/sounds/alsa/Front_Center.wav',
  gain: 100,
  debug: true,
  player: 'aplay',
  device: 'plughw:1,0' }
verbose: TJBot speaking with voice en-US_MichaelVoice
verbose: TJBot speaking: Hello World
========= { filename: '/tmp/tjbot1181015-1247-yuu903.29rq',
  gain: 100,
  debug: true,
  player: 'aplay',
  device: 'plughw:1,0' }

Any idea? Do I miss something?

closed time in 2 months

newbie135

issue commentibmtjbot/tjbot

tj.speak results in TypeError: Cannot read property 'pipe' of undefined

Closing due to inactivity

newbie135

comment created time in 2 months

issue commentibmtjbot/tjbot

Unable to complete "Build A Talking Robot"

It looks like the Assistant service doesn't know which workspace to use:

Missing required parameters: workspace_id

Did you do the following?

Import the workspace-sample.json file into the Watson Assistant service and note the workspace ID.

Make a copy the default configuration file and update it with the Watson service credentials and the conversation workspace ID.

$ cp config.default.js config.js
$ nano config.js
<enter your credentials and the conversation workspace ID in the specified places>
zacaintmyname

comment created time in 2 months

issue openedibmtjbot/tjbot

Unable to complete "Build A Talking Robot"

Hi, I am new to this field. I was playing around with TJBot and I have run into a problem.

Would you be able to let me know what went wrong?

Am using the tutorial from https://github.com/ibmtjbot/tjbot/blob/master/recipes/conversation/README.md.

Below is what I experience when I verbally ask the bot "Watson, introduce yourself". info: TJBot heard: Watson introduce yourself error: the assistant service returned an error. message=Missing required parameters: workspace_id, stack=Error: Missing required parameters: workspace_id at Object.getMissingParams (/home/pi/Desktop/tjbot/recipes/conversation/node_modules/watson-developer-cloud/lib/helper.js:95:11) at AssistantV1.message (/home/pi/Desktop/tjbot/recipes/conversation/node_modules/watson-developer-cloud/assistant/v1.js:96:38) at TJBot.converse (/home/pi/Desktop/tjbot/recipes/conversation/node_modules/tjbot/lib/tjbot.js:719:21) at /home/pi/Desktop/tjbot/recipes/conversation/conversation.js:53:12 at RecognizeStream.<anonymous> (/home/pi/Desktop/tjbot/recipes/conversation/node_modules/tjbot/lib/tjbot.js:798:13) at RecognizeStream.emit (events.js:180:13) at addChunk (_stream_readable.js:274:12) at readableAddChunk (_stream_readable.js:261:11) at RecognizeStream.Readable.push (_stream_readable.js:218:10) at /home/pi/Desktop/tjbot/recipes/conversation/node_modules/watson-developer-cloud/lib/recognize-stream.js:306:34 at Array.forEach (<anonymous>) at W3CWebSocket.socket.onmessage (/home/pi/Desktop/tjbot/recipes/conversation/node_modules/watson-developer-cloud/lib/recognize-stream.js:299:34) at W3CWebSocket._dispatchEvent [as dispatchEvent] (/home/pi/Desktop/tjbot/recipes/conversation/node_modules/yaeti/lib/EventTarget.js:107:17) at W3CWebSocket.onMessage (/home/pi/Desktop/tjbot/recipes/conversation/node_modules/websocket/lib/W3CWebSocket.js:234:14) at WebSocketConnection.<anonymous> (/home/pi/Desktop/tjbot/recipes/conversation/node_modules/websocket/lib/W3CWebSocket.js:205:19) at WebSocketConnection.emit (events.js:180:13)

Will anyone be able to help me out? Thank you!

created time in 2 months

startedibmtjbot/tjbot

started time in 2 months

push eventibmtjbot/ibmtjbot.github.io

Maryam Ashoori

commit sha b3cf15650fe171f2dfcf7982dd4a17aa36d02c7d

Update index.html minor change

view details

push time in 3 months

more