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

startedibmtjbot/tjbot

started time in 4 days

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 5 days

startedibmtjbot/tjbot

started time in 5 days

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 7 days

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 7 days

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 7 days

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 7 days

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 7 days

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 8 days

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 8 days

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 9 days

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 9 days

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 9 days

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 9 days

fghafour

issue commentibmtjbot/tjbot

internal/modules/cjs/loader.js:605

Closing due to inactivity

fghafour

comment created time in 9 days

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 9 days

newbie135

issue commentibmtjbot/tjbot

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

Closing due to inactivity

newbie135

comment created time in 9 days

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 9 days

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 10 days

startedibmtjbot/tjbot

started time in 14 days

push eventibmtjbot/ibmtjbot.github.io

Maryam Ashoori

commit sha b3cf15650fe171f2dfcf7982dd4a17aa36d02c7d

Update index.html minor change

view details

push time in 14 days

push eventibmtjbot/ibmtjbot.github.io

Maryam Ashoori

commit sha 023c5081e4c895642a0a5eaae46de80858f1ebf5

Update index.html adding the EU supplier info

view details

push time in 14 days

issue openedibmtjbot/tjbot

Suggestion: Support For Newer Version of Node/JavaScript

As a frontend developer working with JavaScript daily, I think it would be really nice to be able to write with fancy ES6 syntax. I believe the easiest way of making this work would be to use Babel.

What is the status on this?

created time in 20 days

fork Ryan-Reed/tjbotlib

Node.js library that abstracts basic functions for TJBot.

fork in 21 days

issue commentibmtjbot/tjbot

Suggestion: use normal RGB LED

@tobykurien Thank you! Can you detail step by step? I'm from Brazil and I can not find NeoPixel here, the freight to import over the internet is very expensive.

tobykurien

comment created time in a month

issue commentibmtjbot/tjbot

Suggestion: use normal RGB LED

@gqferreira I had to pick some unused GPIO ports for each of red, green and blue channels for the RGB LED (and wire the resistors inline), then modify the code to use pigpio to apply PWM to those channels to change colour. If you're not familiar with how to do this, getting the NeoPixel will be the easier option.

tobykurien

comment created time in a month

startedibmtjbot/tjbot

started time in a month

startedibmtjbot/tjbot

started time in a month

issue commentibmtjbot/tjbot

Using normal RGB Led

The Neopixel is listed as in stock on Adafruit: https://www.adafruit.com/product/1734

Using LEDs other than the Neopixel is not officially supported, but I'm sure it's possible to do. I don't have good guidance on how, though, since I've only used the Neopixel.

Yes but the shipping is the problem for me: image

gqferreira

comment created time in a month

issue commentibmtjbot/tjbot

Using normal RGB Led

The Neopixel is listed as in stock on Adafruit: https://www.adafruit.com/product/1734

Using LEDs other than the Neopixel is not officially supported, but I'm sure it's possible to do. I don't have good guidance on how, though, since I've only used the Neopixel.

gqferreira

comment created time in a month

issue openedibmtjbot/tjbot

Using normal RGB Led

How to use common RGB LED? Do I need resistors? What is the scheme for soldering and bonding in the GPIO? I can not find NeoPixel to buy.

Thank you!

created time in a month

issue commentibmtjbot/tjbot

Suggestion: use normal RGB LED

No problem. FYI, I soldered resistors inline with the leads of the RGB LED and then used jumper cables to connect it to the RPi. Works a treat, but does require soldering. Could also be done by inlining with short female-to-female jumper cables.

Hello @tobykurien, could you explain what resistors you need and their positions? I can not find NeoPixel to buy but I can solder the resistors. Are GPIO positions the same?

Thank you!

tobykurien

comment created time in a month

startedibmtjbot/tjbotlib

started time in a month

startedibmtjbot/tjbot

started time in a month

issue commentibmtjbot/tjbot

internal/modules/cjs/loader.js:605

I remove all those tjbot files in /tmp directory and rebooted tjbot. After reboot tjbot only have conversation once not interactive and after that keeps quite. I have to reboot it again to have one conversation only :(

fghafour

comment created time in a month

issue commentibmtjbot/tjbot

internal/modules/cjs/loader.js:605

That weird noise issue happened once to me, too, it was because I was playing with the code inside the conversation.js file. Can't recall what I was trying to do but I wasn't doing it correctly. Any chance you accidentally moved or changed something? If you figure out what caused it, let me know!

fghafour

comment created time in a month

issue commentibmtjbot/tjbot

internal/modules/cjs/loader.js:605

I found out that clearing the /tm and getting rid of tjbot* files and rebooting everything works. Not sure why in the first place it failed. Would it be internet bandwidth problem (slow connection). Need to investigate more :)

fghafour

comment created time in a month

issue commentibmtjbot/tjbot

internal/modules/cjs/loader.js:605

I have noticed something with Watson conversation when i run the conversation.js and ask Watson introduce yourself. Tjbot starts making sounds that is like those star trek movies and keeps on looping. Is there anything I am missing. I have to basically break by ctrl+c otherwise it will just keep on making sound.

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 info: TJBot heard: Watson tell me a joke verbose: TJBot response from conversation workspace id e18c6c43-9164-4339-9638-a9afd06dbe5c Why was the robot upset? People kept pushing its buttons. : verbose: TJBot speaking with voice en-US_MichaelVoice verbose: TJBot speaking: Why was the robot upset? People kept pushing its buttons. ========= { filename: '/tmp/tjbot11917-1019-1hdislp.2pcg', gain: 100, debug: true, player: 'aplay', device: 'plughw:0,0' } ^C2019-02-07 08:45:32 sigHandler: Unhandled signal 2, terminating

fghafour

comment created time in a month

PR opened ibmtjbot/tjbotlib

added stdin and stdout support for 'listening' and 'speaking' along w…

…ith other useful functions. And updated the readme file.

+112 -20

0 comment

3 changed files

pr created time in a month

fork fadub/tjbotlib

Node.js library that abstracts basic functions for TJBot.

fork in a month

issue commentibmtjbot/tjbot

internal/modules/cjs/loader.js:605

Great! Glad it's working now!

fghafour

comment created time in a month

issue commentibmtjbot/tjbot

internal/modules/cjs/loader.js:605

Finally!! Got it working on speech_to_text. I had to delete the service and re-add it. It is working now. Many Many thanks :)

fghafour

comment created time in a month

startedibmtjbot/tjbot

started time in a month

issue commentibmtjbot/tjbot

internal/modules/cjs/loader.js:605

I am still having issues with verbose: TJBot initializing microphone error: the speech_to_text service returned an error. message=WebSocket connection error, I will basically cancel the speech_to_text service and re-initialize it. Hopefully that may be fix. But I am suspicious that it has something to do with the USB mic that I am using that came with TJBot.

During this process I found something that I would like to share with you is that up in this post at one point I had this issue:

 sudo node config.js
 sudo: node: command not found

this happens when Node.js is installed NVM. In order to avoid that Node should not be installed through NVM and make sure that NVM is not installed in Raspi.

I will keep you update :)

fghafour

comment created time in a month

issue commentibmtjbot/tjbot

internal/modules/cjs/loader.js:605

Try running just npm install instead of sudo npm install.

fghafour

comment created time in a month

issue commentibmtjbot/tjbot

internal/modules/cjs/loader.js:605

after refreshing OS, i went to "/tests" directory and run sudo npm install it is giving the following: de_modules/pigpio/.node-gyp/9.11.2" gyp WARN EACCES attempting to reinstall using temporary dev dir "/home/pi/Desktop/tjbot/bootstrap/tests/node_modules/pigpio/.node-gyp"

If i am using sudo command then it should have root access.

fghafour

comment created time in a month

issue commentibmtjbot/tjbot

internal/modules/cjs/loader.js:605

no lucks yet :( I have reloaded the OS again and will see how it goes. I will keep you updated.

fghafour

comment created time in a month

issue commentibmtjbot/tjbot

internal/modules/cjs/loader.js:605

Any luck?

fghafour

comment created time in a month

issue closedibmtjbot/tjbot

LED not working with TJbot (but with other tests)

Hi -

I've been setting up my TJBot to use the text-to-speech receipe, but the LED is not working. Conversation connection works & understands me correctly, but the LED stays off. The Hardware Test (test.led.js) also does not work. However, I've checked with other scripts and even scratch 2. The wiring is correct (using GPIO 18) and the LED can be turned on and off by these other scripts/programs.

Any help is greatly appreciated, Thanks!

closed time in 2 months

Muensterberg

issue commentibmtjbot/tjbot

LED not working with TJbot (but with other tests)

Great! Happy TJ-ing! :-)

Muensterberg

comment created time in 2 months

issue commentibmtjbot/tjbot

LED not working with TJbot (but with other tests)

Hi all, thanks very much for your support. Seems my problems have been fixed now, they actually have been related to a fault y LED. I received the bot from a colleague and did not have a spare LED to test initially, so I assumed when I got the original LED to light up blue n some tests, it should be working. However, this was not the case, and a fresh LED actually solved the problem.

Again, thanks for your help & happy TJ-ing

Muensterberg

comment created time in 2 months

issue commentibmtjbot/tjbot

problems with tj.see and tj.recognizeObjectsInPhoto

I have the same problem, but curiously I see that the IP address belongs to amazonaws.com!

winchenbach

comment created time in 2 months

issue commentibmtjbot/tjbot

internal/modules/cjs/loader.js:605

Check this out, see if it helps: https://github.com/ibmtjbot/tjbot/issues/104

fghafour

comment created time in 2 months

issue commentibmtjbot/tjbot

internal/modules/cjs/loader.js:605

I have reinstalled everything and am very close to get it working. When i run sudo node coversation.js, it fails on the following line and keeps on repeating the same line: verbose: TJBot initializing microphone error: the speech_to_text service returned an error. message=WebSocket connection error, stack=WebSocket conne ction error: WebSocket connection error at W3CWebSocket.socket.onerror (/home/pi/Desktop/tjbot/recipes/conversation/node_modules/watson-developer- cloud/lib/recognize-stream.js:212:23) at W3CWebSocket._dispatchEvent [as dispatchEvent] (/home/pi/Desktop/tjbot/recipes/conversation/node_module s/yaeti/lib/EventTarget.js:107:17) at W3CWebSocket.onConnectFailed (/home/pi/Desktop/tjbot/recipes/conversation/node_modules/websocket/lib/W3 CWebSocket.js:217:14) at WebSocketClient.<anonymous> (/home/pi/Desktop/tjbot/recipes/conversation/node_modules/websocket/lib/W3C WebSocket.js:59:25) at WebSocketClient.emit (events.js:180:13) at WebSocketClient.failHandshake (/home/pi/Desktop/tjbot/recipes/conversation/node_modules/websocket/lib/W ebSocketClient.js:339:10) at ClientRequest.<anonymous> (/home/pi/Desktop/tjbot/recipes/conversation/node_modules/websocket/lib/WebSo cketClient.js:278:18) at ClientRequest.emit (events.js:180:13) at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:540:21) at HTTPParser.parserOnHeadersComplete (_http_common.js:117:17) at TLSSocket.socketOnData (_http_client.js:445:20) at TLSSocket.emit (events.js:180:13) at addChunk (_stream_readable.js:274:12) at readableAddChunk (_stream_readable.js:261:11) at TLSSocket.Readable.push (_stream_readable.js:218:10) at TLSWrap.onread (net.js:581:20), name=WebSocket connection error, type=error, isTrusted=false, _yaeti=tr ue, , 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);
fghafour

comment created time in 2 months

issue commentibmtjbot/tjbot

internal/modules/cjs/loader.js:605

Thanks David. Will install 9.11.2

fghafour

comment created time in 2 months

issue commentibmtjbot/tjbot

internal/modules/cjs/loader.js:605

I would try 9.11.2

fghafour

comment created time in 2 months

issue commentibmtjbot/tjbot

internal/modules/cjs/loader.js:605

One question. Should I install node version 9 or the latest that is 11.

fghafour

comment created time in 2 months

issue commentibmtjbot/tjbot

internal/modules/cjs/loader.js:605

thanks that worked :)

I had so many node issues when first starting to work with TJBot. This really helped me:

on that I would 1000% trust you. I have been working with some IBM Apps and installing them is like going through hell.

fghafour

comment created time in 2 months

issue commentibmtjbot/tjbot

internal/modules/cjs/loader.js:605

Here's the link again, not sure why it's not working above but if it doesn't work this time, just copy and paste it into the browser: https://www.battlehillmedia.com/installing-node-js-and-npm-on-raspberry-pi-3/

This also might help, even though it's old: https://stackoverflow.com/questions/31472755/sudo-npm-command-not-found?rq=1

fghafour

comment created time in 2 months

issue commentibmtjbot/tjbot

internal/modules/cjs/loader.js:605

Thanks Davia. node -v would display ver 9.0.0 I have already refreshed my TJbot The link you sent is no longer available.

fghafour

comment created time in 2 months

issue commentibmtjbot/tjbot

internal/modules/cjs/loader.js:605

I had so many node issues when first starting to work with TJBot. This really helped me: https://www.battlehillmedia.com/installing-node-js-and-npm-on-raspberry-pi-3/

fghafour

comment created time in 2 months

issue commentibmtjbot/tjbot

internal/modules/cjs/loader.js:605

What happens if you type in node -v?

fghafour

comment created time in 2 months

issue commentibmtjbot/tjbot

internal/modules/cjs/loader.js:605

both commands are failing:

pi@raspberrypi:~/Desktop/tjbot/recipes/conversation $ sudo node conversation.js sudo: node: command not found pi@raspberrypi:~/Desktop/tjbot/recipes/conversation $ sudo node config.js sudo: node: command not found

fghafour

comment created time in 2 months

issue commentibmtjbot/tjbot

internal/modules/cjs/loader.js:605

Is sudo node config.js failing or is sudo node conversation.js failing?

fghafour

comment created time in 2 months

issue commentibmtjbot/tjbot

internal/modules/cjs/loader.js:605

Thanks Davia. Since sudo node config.js is failing, I would not be able to run the recipe. I have tried to uninstall node and it seems that there are multiple versions. I will be reloading the OS and hopefully that would fix the issue.

fghafour

comment created time in 2 months

issue commentibmtjbot/tjbot

internal/modules/cjs/loader.js:605

The root privileges means you need to run sudo node conversation.js

fghafour

comment created time in 2 months

issue commentibmtjbot/tjbot

internal/modules/cjs/loader.js:605

I think i have to reload my PI . I have got installed Node.js multiple times sudo node conversation.js sudo: node: command not found

now I am getting this: node conversation.js 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(); ^

Let me reload PI again and keep my fingers crossed :)

fghafour

comment created time in 2 months

issue commentibmtjbot/tjbot

internal/modules/cjs/loader.js:605

Try removing the node_modules first?

rm -rf node_modules
npm cache clean
npm install
fghafour

comment created time in 2 months

issue commentibmtjbot/tjbot

LED not working with TJbot (but with other tests)

Hi Jens,

What @daviadenisco suggested sometimes work. The lovely ctrl+alt+del trick! :)

Anyways, are you using the built-in audio by any chance? Like the speech to text in the conversation recipe? If that's the case, Raspberry Pi has a known issue of the built-in audio hardware interfering with the GPIO pins. Depending on your configuration of Raspbian, the sound drivers may be more aggressive in taking away control of GPIO 18 from other processes. I had this problem in the past and used this trick to fix it.

sudo cp bootstrap/tjbot-blacklist-snd.conf /etc/modprobe.d/
sudo update-initramfs -u
sudo reboot

If this is not the case, could you confirm the type of LED are you using? Is that NeoPixel?

Muensterberg

comment created time in 2 months

issue commentibmtjbot/tjbot

internal/modules/cjs/loader.js:605

Okay, maybe try running npm install again? In the project folder and/or the recipe folder. If that doesn't work, maybe try reinstalling node? Not sure whether any of that will work, just thinking it's a node issue.

fghafour

comment created time in 2 months

issue commentibmtjbot/tjbot

LED not working with TJbot (but with other tests)

A bit different but a few days ago, I had an issue where once the test.led.js ran and the LED was turned off, the LED would not turn back on. My commands were being heard and printed to the console but the LED was completely unresponsive. So, I shut down the Pi, unplugged it, plugged it back in, started it back up and it worked fine.

Muensterberg

comment created time in 2 months

issue commentibmtjbot/tjbot

internal/modules/cjs/loader.js:605

I did try with sudo node conversation.js :( still the same. sudo node conversation.js internal/modules/cjs/loader.js:683 return process.dlopen(module, path.toNamespacedPath(filename));

this is my config.js file

/*

  • User-specific configuration
  • IMPORTANT NOTES:
  • Please ensure you do not interchange your username and password.
  • Your username is the longer value: 36 digits, including hyphens
  • Your password is the smaller value: 12 characters */

exports.workspaceId = 'xxxx-ecce-xxx-xxx-xxxxx'; // replace with the workspace identifier of your conversation

// Set this to false if your TJBot does not have a camera. exports.hasCamera = true;

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

// Create the credentials object for export exports.credentials = {};

// Watson Assistant // https://www.ibm.com/watson/services/conversation/ exports.credentials.assistant = { // username/password authentication -- if your service uses this method, // uncomment these two lines and comment the 'apikey' line below // username: '', // password: '', // IAM authentication -- fill in your API key below apikey: '000000000-XXXXXX_YY_ZZZZZZ', // service URL -- change this if the URL is different in your authentication credentials url: 'https://gateway.watsonplatform.net/assistant/api/' };

// Watson Speech to Text // https://www.ibm.com/watson/services/speech-to-text/ exports.credentials.speech_to_text = { // username/password authentication -- if your service uses this method, // uncomment these two lines and comment the 'apikey' line below // username: '', // password: '', // IAM authentication -- fill in your API key below apikey: 'XXXXxxxxx-YYYYYYYY_U', // service URL -- change this if the URL is different in your authentication credentials url: 'https://stream.watsonplatform.net/speech-to-text/api/' };

// Watson Text to Speech // https://www.ibm.com/watson/services/text-to-speech/ exports.credentials.text_to_speech = { // username/password authentication -- if your service uses this method, // uncomment these two lines and comment the 'apikey' line below // username: '', // password: '', // IAM authentication -- fill in your API key below apikey: 'XXXXXX-XYYYYYYYYYYY_v6YTWIVryLc7', // service URL -- change this if the URL is different in your authentication credentials url: 'https://stream.watsonplatform.net/text-to-speech/api/' };

// Watson Visual Recognition // https://www.ibm.com/watson/services/visual-recognition/ exports.credentials.visual_recognition = { // username/password authentication -- if your service uses this method, // uncomment these two lines and comment the 'apikey' line below // username: '', // password: '', // IAM authentication -- fill in your API key below apikey: 'AAAAAAAAAAA-XXXXXXXXXXXXXXXXXXXXXXXXX', // service URL -- change this if the URL is different in your authentication credentials url: 'https://gateway.watsonplatform.net/visual-recognition/api' };

fghafour

comment created time in 2 months

issue openedibmtjbot/tjbot

LED not working with TJbot (but with other tests)

Hi -

I've been setting up my TJBot to use the text-to-speech receipe, but the LED is not working. Conversation connection works & understands me correctly, but the LED stays off. The Hardware Test (test.led.js) also does not work. However, I've checked with other scripts and even scratch 2. The wiring is correct (using GPIO 18) and the LED can be turned on and off by these other scripts/programs.

Any help is greatly appreciated, Thanks!

created time in 2 months

issue commentibmtjbot/tjbot

internal/modules/cjs/loader.js:605

While I don't have my TJBot with me today, I don't think you need to put anything in the exports.credentials ={}

I really don't know what that error could be, wondering if it's a node issue but here are a few things to try before doing anything with node:

  1. Try running conversation.js with this command: sudo node conversation.js
  2. Did you enter your workspace_id in the config.js file for the conversation recipe?
  3. Try posting your config.js file here (sans your apikeys) and we can take a look at the file.

Hope this helps!

fghafour

comment created time in 2 months

issue commentibmtjbot/tjbot

internal/modules/cjs/loader.js:605

I am getting the following error when I try conversation recipe: node conversation.js internal/modules/cjs/loader.js:683 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.<anonymous> (/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.<anonymous> (/home/pi/Desktop/tjbot/recipes/conversation/node_modules/tjbot/lib/tjbot.js:24:15) at Module._compile (internal/modules/cjs/loader.js:654:30)

Also in config.js file for conversation there is a section for credentials: // Create the credentials object for export exports.credentials = {}; is there anything that I need to put here?

fghafour

comment created time in 2 months

issue commentibmtjbot/tjbot

internal/modules/cjs/loader.js:605

Thanks Davia, that is exactly what I thought. I just wanted to make sure I was on the right track.

fghafour

comment created time in 2 months

issue commentibmtjbot/tjbot

internal/modules/cjs/loader.js:605

Turns out this is an easy change - even though it took me days to figure out earlier this month - just change "password" to "apikey", and "username" to "url" and insert the credentials from the Manage tab. Do the same for all other recipes.

A lot of documentation is outdated but this repo was recently updated, so if you look at the Speech to Text recipe, the config.default.js file has been updated to include apikey and url instead of password and username.

Should look like this:

* User-specific configuration
* IMPORTANT NOTES:
*  Please ensure you do not interchange your username and password.
*  Your username is the longer value: 36 digits, including hyphens
*  Your password is the smaller value: 12 characters
*/

// Create the credentials object for export
exports.credentials = {};

// Watson Speech to Text
// https://www.ibm.com/watson/services/speech-to-text/
exports.credentials.speech_to_text = {
    // username/password authentication -- if your service uses this method,
    // uncomment these two lines and comment the 'apikey' line below
    // username: '',
    // password: '',
    // IAM authentication -- fill in your API key below
    apikey: 'FILL IN YOUR API KEY HERE',
    // service URL -- change this if the URL is different in your authentication credentials
    url: 'https://stream.watsonplatform.net/speech-to-text/api/'
};```
fghafour

comment created time in 2 months

issue commentibmtjbot/tjbot

internal/modules/cjs/loader.js:605

Thanks David the link you sent did the job.

Would you be able to share your config.js file as I see there are different ones. The old ones has "username" and "password" the new ones has api-key with URL. apikey is basically password, I am confused with username, where does it go in the config.js file.

thanks.

fghafour

comment created time in 2 months

push eventibmtjbot/tjbot

Maryam Ashoori

commit sha 02701f1fd14d064a5f9f8ffddf4e75c80bad4ecb

Update README.md adding instructions for changing the attention word and intents

view details

Maryam Ashoori

commit sha f85a7f9c34b0b3975e4e99cc3cd9d28e061ea0cc

Update README.md minor edit

view details

Maryam Ashoori

commit sha 4f93197d4c2b4960575b8436dcd0f4c048484795

Update README.md minor styling

view details

push time in 2 months

push eventibmtjbot/tjbot

Maryam Ashoori

commit sha 4f93197d4c2b4960575b8436dcd0f4c048484795

Update README.md minor styling

view details

push time in 2 months

push eventibmtjbot/tjbot

Maryam Ashoori

commit sha f85a7f9c34b0b3975e4e99cc3cd9d28e061ea0cc

Update README.md minor edit

view details

push time in 2 months

push eventibmtjbot/tjbot

Maryam Ashoori

commit sha 02701f1fd14d064a5f9f8ffddf4e75c80bad4ecb

Update README.md adding instructions for changing the attention word and intents

view details

push time in 2 months

push eventibmtjbot/tjbot

Justin Weisz

commit sha 0f16e8858982ab227f66ef200fdf5db3176b5c4b

Merge pull request #126 from ibmtjbot/dev Support for IAM authentication, new Tone Analyzer API

view details

Maryam Ashoori

commit sha cd50bd4f65ea2d3ac971a301bebd9c0791b63e11

minor typo

view details

Maryam Ashoori

commit sha 7dd20cd36cbe86462d890dcd8c5454513c37780a

fixing typo

view details

Maryam Ashoori

commit sha b5040a17ba2cba51b96d6d265f3781c611f6c6d5

Update README.md adding Watson Speech to text to the instructions

view details

Maryam Ashoori

commit sha 12076e77e2a69e94ffb035f8c562e00f0eee8147

Update README.md adding Watson speech to text to the instructions

view details

Maryam Ashoori

commit sha 3c30bde240115cae09e32a3801d2127694d1d72f

Update conversation.js adding the placeholder for changing the attention word

view details

Maryam Ashoori

commit sha a8da0c9c95d5a2fd610aa0977b465d39f3731393

Update conversation.js moving tjConfig to config file

view details

Maryam Ashoori

commit sha 269e15e95ace3012e7840d2c171132856b1cf380

Update config.default.js adding tjConfig to the config file

view details

Justin Weisz

commit sha fe134aa4437a68014dcfdb4f04ff732423202ccb

Update recipes/conversation/config.default.js Co-Authored-By: maryamashoori <maryam@us.ibm.com>

view details

Justin Weisz

commit sha 4578f130c721a6447c6c50315064da2503411557

Merge pull request #129 from maryamashoori/master moving tjConfig from conversations to config file

view details

push time in 2 months

push eventibmtjbot/tjbot

Maryam Ashoori

commit sha a8da0c9c95d5a2fd610aa0977b465d39f3731393

Update conversation.js moving tjConfig to config file

view details

Maryam Ashoori

commit sha 269e15e95ace3012e7840d2c171132856b1cf380

Update config.default.js adding tjConfig to the config file

view details

Justin Weisz

commit sha fe134aa4437a68014dcfdb4f04ff732423202ccb

Update recipes/conversation/config.default.js Co-Authored-By: maryamashoori <maryam@us.ibm.com>

view details

Justin Weisz

commit sha 4578f130c721a6447c6c50315064da2503411557

Merge pull request #129 from maryamashoori/master moving tjConfig from conversations to config file

view details

push time in 2 months

Pull request review commentibmtjbot/tjbot

moving tjConfig from conversations to config file

 exports.workspaceId = ''; // replace with the workspace identifier of your conve // Set this to false if your TJBot does not have a camera. exports.hasCamera = true; +// set up TJBot's configuration+exports.tjConfig = {+    log: {+        level: 'verbose'+    },+    // Changing the robot name will change the attention word+    // robot: {+    //    name: ‘tee jay bot’
    //    name: 'tee jay bot'
maryamashoori

comment created time in 2 months

PR opened ibmtjbot/tjbot

moving tjConfig from conversations to config file
+13 -10

0 comment

2 changed files

pr created time in 2 months

push eventibmtjbot/tjbot

Maryam Ashoori

commit sha 3c30bde240115cae09e32a3801d2127694d1d72f

Update conversation.js adding the placeholder for changing the attention word

view details

push time in 2 months

push eventibmtjbot/tjbot

Maryam Ashoori

commit sha 12076e77e2a69e94ffb035f8c562e00f0eee8147

Update README.md adding Watson speech to text to the instructions

view details

push time in 2 months

push eventibmtjbot/tjbot

Maryam Ashoori

commit sha b5040a17ba2cba51b96d6d265f3781c611f6c6d5

Update README.md adding Watson Speech to text to the instructions

view details

push time in 2 months

issue openedibmtjbot/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.

created time in 2 months

issue commentibmtjbot/tjbot

internal/modules/cjs/loader.js:605

It's possible that the USB mic isn't configured with the Pi?

You may have to manually set the microphoneDeviceId in the configuration object:

   listen: {
        microphoneDeviceId: "plughw:1,0", // plugged-in USB card 1, device 0; see arecord -l for a list of recording devices
        inactivityTimeout: -1,
        language: 'en-US' 
    },

This was helpful for me getting set up: https://iotbytes.wordpress.com/connect-configure-and-test-usb-microphone-and-speaker-with-raspberry-pi/

fghafour

comment created time in 2 months

issue commentibmtjbot/tjbot

internal/modules/cjs/loader.js:605

Thanks Davia & David. Node 11 was the culprit. It seems to be working, but frozen on initializing mic node stt.js verbose: TJBot initializing LED [rpi-ws281x-native] This module requires being run with root-privileges. A non-functional stub of the interface will be returned. verbose: TJBot initializing microphone verbose: TJBot initializing speech_to_text service info: Hello from TJBot! My name is Watson. verbose: TJBot library version v1.5.1 I understand lots of colors. You can tell me to shine my light a different color by saying 'turn the light red' or 'change the light to green' or 'turn the light off'. verbose: TJBot initializing microphone "frozen here"

fghafour

comment created time in 2 months

issue commentibmtjbot/tjbot

internal/modules/cjs/loader.js:605

sure, will try that and see if that fixes the issue.

fghafour

comment created time in 2 months

more