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

issue commentibmtjbot/tjbot

Error: pigpio error -1 in gpioInitialise

Awesome, I'm glad you figured it out!

GRuuuuu

comment created time in 2 days

startedibmtjbot/tjbot

started time in 3 days

issue closedibmtjbot/tjbot

Error: pigpio error -1 in gpioInitialise

Hello,

Environment
Linux raspberrypi 4.14.30-v7+ node : v8.11.3 npm : v5.6.0

The problem is when I run the code that using servo It makes an error below.

pi@raspberrypi:~/tjbot/recipes/conversation $ sudo node 02arm.js
verbose: TJBot initializing servo motor on PIN 7
2019-10-11 18:56:53 initInitialise: Can't lock /var/run/pigpio.pid
/home/pi/tjbot/recipes/conversation/tjbotlib/node_modules/pigpio/pigpio.js:11
    pigpio.gpioInitialise();
           ^

Error: pigpio error -1 in gpioInitialise
    at initializePigpio (/home/pi/tjbot/recipes/conversation/tjbotlib/node_modules/pigpio/pigpio.js:11:12)
    at new Gpio (/home/pi/tjbot/recipes/conversation/tjbotlib/node_modules/pigpio/pigpio.js:25:3)
    at TJBot._setupServo (/home/pi/tjbot/recipes/conversation/tjbotlib/lib/tjbot.js:361:19)
    at TJBot.<anonymous> (/home/pi/tjbot/recipes/conversation/tjbotlib/lib/tjbot.js:74:22)
    at Array.forEach (<anonymous>)
    at new TJBot (/home/pi/tjbot/recipes/conversation/tjbotlib/lib/tjbot.js:59:14)
    at Object.<anonymous> (/home/pi/tjbot/recipes/conversation/02arm.js:22:10)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Function.Module.runMain (module.js:693:10)
    at startup (bootstrap_node.js:191:16)
    at bootstrap_node.js:612:3

Through the google search, I can get some of the solutions. one of solutions like this :

pi@raspberrypi:~/tjbot/recipes/conversation $ cat /var/run/pigpio.pid
313
pi@raspberrypi:~/tjbot/recipes/conversation $ sudo kill -9 313
pi@raspberrypi:~/tjbot/recipes/conversation $ rm /var/run/pigpio.pid

after that, I got another error.

pi@raspberrypi:~/tjbot/recipes/conversation $ sudo node 02arm.js
verbose: TJBot initializing servo motor on PIN 7
2019-10-11 18:57:28 initInitialise: bind to port 8888 failed (Address already in use)
/home/pi/tjbot/recipes/conversation/tjbotlib/node_modules/pigpio/pigpio.js:11
    pigpio.gpioInitialise();
           ^

Error: pigpio error -1 in gpioInitialise
    at initializePigpio (/home/pi/tjbot/recipes/conversation/tjbotlib/node_modules/pigpio/pigpio.js:11:12)
    at new Gpio (/home/pi/tjbot/recipes/conversation/tjbotlib/node_modules/pigpio/pigpio.js:25:3)
    at TJBot._setupServo (/home/pi/tjbot/recipes/conversation/tjbotlib/lib/tjbot.js:361:19)
    at TJBot.<anonymous> (/home/pi/tjbot/recipes/conversation/tjbotlib/lib/tjbot.js:74:22)
    at Array.forEach (<anonymous>)
    at new TJBot (/home/pi/tjbot/recipes/conversation/tjbotlib/lib/tjbot.js:59:14)
    at Object.<anonymous> (/home/pi/tjbot/recipes/conversation/02arm.js:22:10)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Function.Module.runMain (module.js:693:10)
    at startup (bootstrap_node.js:191:16)
    at bootstrap_node.js:612:3
  • I change hardwares (board, servo, SDcard..) but same result. ++ And, I also test hardwares in Node-red. Strangely, It works well. so The hardwares are not problems.

closed time in 3 days

GRuuuuu

issue commentibmtjbot/tjbot

Error: pigpio error -1 in gpioInitialise

Hello,

Thank you so much for your help. I figured out this problem.

To avoid crashing port, I used configureSocketPort function and set the default port 8888 to 8889

to use configureSocketPort, You must upgrade pigpio to 0.6.0 or higher.

So I changed the code tjbotlib/lib/tjbot.js

TJBot.prototype._setupServo = function(pin) {
    var pigpio=require('pigpio');
    pigpio.configureSocketPort(8889);
    var Gpio=pigpio.Gpio;
    ....

And It worked well for me.

By the way, I think all the problem that I have is caused by old dependency. (specially pigpio, I used v0.4.0) So In the recent version of code, It may not happen.

+) Additionally In my case, The instance holding port 8888 is Node-Red

GRuuuuu

comment created time in 3 days

issue commentibmtjbot/tjbot

Error: pigpio error -1 in gpioInitialise

Hm, this looks like a pigpio issue, not a tjbot one.

Are you running on Raspian Buster? I haven't done any testing on that. It's possible some of our dependencies aren't working as expected in the new OS.

I found these from googling. There might be another service running that uses port 8888, and you should be able to hack pigpio to change the port to something else.

https://github.com/fivdi/pigpio/issues/7 https://github.com/fivdi/pigpio/issues/22

Let me know how it goes.

GRuuuuu

comment created time in 5 days

issue openedibmtjbot/tjbot

Error: pigpio error -1 in gpioInitialise

Hello,

Environment node : v8.11.3 npm : v5.6.0

The problem is when I run the code that using servo It makes an error below.

pi@raspberrypi:~/tjbot/recipes/conversation $ sudo node 02arm.js
verbose: TJBot initializing servo motor on PIN 7
2019-10-11 18:56:53 initInitialise: Can't lock /var/run/pigpio.pid
/home/pi/tjbot/recipes/conversation/tjbotlib/node_modules/pigpio/pigpio.js:11
    pigpio.gpioInitialise();
           ^

Error: pigpio error -1 in gpioInitialise
    at initializePigpio (/home/pi/tjbot/recipes/conversation/tjbotlib/node_modules/pigpio/pigpio.js:11:12)
    at new Gpio (/home/pi/tjbot/recipes/conversation/tjbotlib/node_modules/pigpio/pigpio.js:25:3)
    at TJBot._setupServo (/home/pi/tjbot/recipes/conversation/tjbotlib/lib/tjbot.js:361:19)
    at TJBot.<anonymous> (/home/pi/tjbot/recipes/conversation/tjbotlib/lib/tjbot.js:74:22)
    at Array.forEach (<anonymous>)
    at new TJBot (/home/pi/tjbot/recipes/conversation/tjbotlib/lib/tjbot.js:59:14)
    at Object.<anonymous> (/home/pi/tjbot/recipes/conversation/02arm.js:22:10)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Function.Module.runMain (module.js:693:10)
    at startup (bootstrap_node.js:191:16)
    at bootstrap_node.js:612:3

Through the google search, I can get some of the solutions. one of solutions like this :

pi@raspberrypi:~/tjbot/recipes/conversation $ cat /var/run/pigpio.pid
313
pi@raspberrypi:~/tjbot/recipes/conversation $ sudo kill -9 313
pi@raspberrypi:~/tjbot/recipes/conversation $ rm /var/run/pigpio.pid

after that, I got another error.

pi@raspberrypi:~/tjbot/recipes/conversation $ sudo node 02arm.js
verbose: TJBot initializing servo motor on PIN 7
2019-10-11 18:57:28 initInitialise: bind to port 8888 failed (Address already in use)
/home/pi/tjbot/recipes/conversation/tjbotlib/node_modules/pigpio/pigpio.js:11
    pigpio.gpioInitialise();
           ^

Error: pigpio error -1 in gpioInitialise
    at initializePigpio (/home/pi/tjbot/recipes/conversation/tjbotlib/node_modules/pigpio/pigpio.js:11:12)
    at new Gpio (/home/pi/tjbot/recipes/conversation/tjbotlib/node_modules/pigpio/pigpio.js:25:3)
    at TJBot._setupServo (/home/pi/tjbot/recipes/conversation/tjbotlib/lib/tjbot.js:361:19)
    at TJBot.<anonymous> (/home/pi/tjbot/recipes/conversation/tjbotlib/lib/tjbot.js:74:22)
    at Array.forEach (<anonymous>)
    at new TJBot (/home/pi/tjbot/recipes/conversation/tjbotlib/lib/tjbot.js:59:14)
    at Object.<anonymous> (/home/pi/tjbot/recipes/conversation/02arm.js:22:10)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Function.Module.runMain (module.js:693:10)
    at startup (bootstrap_node.js:191:16)
    at bootstrap_node.js:612:3
  • I change hardwares (board, servo, SDcard..) but same result. ++ And, I also test hardwares in Node-red. Strangely, It works well. so The hardwares are not problems.

created time in 6 days

fork Elizabeth-hw/tjbotlib

Node.js library that abstracts basic functions for TJBot.

fork in 12 days

issue closedibmtjbot/tjbotlib

Update versions of pigpio and rpi-ws281x-native?

I got my tjbot as a gift last year, but didn't get around to playing with him until now. My 11 year old nephew constructed and wired him without assistance. What an awesome experience for him. I, however, had a little more difficulty due to my late start. :-)

It would appear that the version of node installed with Raspbian Buster won't properly build the pigpio or rpi-ws281x-native modules. In other recipes I tried, I was able to update package.json to reference the latest versions of these. But I can't do that in the tjbot bootstrap module. I was able to fanangle it by building them separately and copying them into the node_modules folder, but that defeats the point of bootstrapping.

Just wanted to make this recommendation on behalf of any new tjbot users that might come along. I appreciate the work you guys have put into this. It's really cool and a great learning tool for him and me.

Thanks a ton!

closed time in 12 days

stonebraker

issue commentibmtjbot/tjbotlib

Update versions of pigpio and rpi-ws281x-native?

Thanks for the feedback (and apologies for taking so long to get this done…). I just released a point release that has newer versions of these libraries specified: https://github.com/ibmtjbot/tjbotlib/releases/tag/v1.5.3

stonebraker

comment created time in 12 days

created tagibmtjbot/tjbotlib

tagv1.5.3

Node.js library that abstracts basic functions for TJBot.

created time in 12 days

release ibmtjbot/tjbotlib

v1.5.3

released time in 12 days

push eventibmtjbot/tjbotlib

Justin Weisz

commit sha 7c69f2bd26e0b43fd029d3244ca864ad64e57164

upgrading versions of pigpio and rpi-ws281x-native

view details

push time in 12 days

push eventibmtjbot/tjbotlib

Justin Weisz

commit sha 7c69f2bd26e0b43fd029d3244ca864ad64e57164

upgrading versions of pigpio and rpi-ws281x-native

view details

push time in 12 days

push eventibmtjbot/tjbotlib

Justin Weisz

commit sha 1380406b950d520cc238fdf219feb8d942f17ddb

adding support for passing classifier_ids to visual recognition (untested)

view details

Justin Weisz

commit sha f1da1c051178d26659dd81f49beff0745b378e04

Merge branch 'master' of github.com:ibmtjbot/tjbotlib into dev

view details

Justin Weisz

commit sha b70a932cf493e84a2211c11edf87a8b7987bb278

Merge branch 'master' of github.com:ibmtjbot/tjbotlib into dev

view details

Justin Weisz

commit sha 1cd2bad81ebfd4f62d0cda8023961bd2d08c5b98

Merge branch 'master' of github.com:ibmtjbot/tjbotlib into dev

view details

Justin Weisz

commit sha a5cf988e45d99eefd3a51f0dd0dc81205611aeab

bumping to 1.5.3

view details

push time in 12 days

push eventibmtjbot/tjbotlib

Justin Weisz

commit sha a5cf988e45d99eefd3a51f0dd0dc81205611aeab

bumping to 1.5.3

view details

push time in 12 days

push eventibmtjbot/tjbotlib

U-AzureAD\JaimeBotella

commit sha 8d74a80347f26efd6bccd93d8a5290068f6edb87

change sample rate and number of channels for the microphone

view details

Justin Weisz

commit sha 8599cb3342551775810d472a8d65f8d117899fe5

Merge pull request #57 from jimbotel/rateandchannels change sample rate and number of channels for the microphone

view details

Justin Weisz

commit sha 1cd2bad81ebfd4f62d0cda8023961bd2d08c5b98

Merge branch 'master' of github.com:ibmtjbot/tjbotlib into dev

view details

push time in 12 days

push eventibmtjbot/tjbotlib

U-AzureAD\JaimeBotella

commit sha 8d74a80347f26efd6bccd93d8a5290068f6edb87

change sample rate and number of channels for the microphone

view details

Justin Weisz

commit sha 8599cb3342551775810d472a8d65f8d117899fe5

Merge pull request #57 from jimbotel/rateandchannels change sample rate and number of channels for the microphone

view details

push time in 12 days

PR merged ibmtjbot/tjbotlib

change sample rate and number of channels for the microphone

I propose to change the sample rate to 16000 and the number of channels to 1, as it doesn't make much sense to use 44000 and 2 channels. Most microphones attached to a TJBot are cheap (low quality) we cannot expect to cover frequencies up to 22Khz accurately and will record in mono. Also, STT service recommends to:

https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-text-audio-formats

The service supports both broadband and narrowband audio for most languages and formats. It automatically adjusts the sampling rate of your audio to match the model that you specify before it recognizes speech.

  • For broadband models, the service converts audio recorded at higher sampling rates to 16 kHz.
  • For narrowband models, it converts the audio to 8 kHz.

In theory, you can send 44 kHz audio with a broadband or narrowband model, but that needlessly increases the size of the audio. To maximize the amount of audio that you can send, match the sampling rate of your audio to the model that you use. The service does not accept audio that is sampled at a rate that is less than the intrinsic sampling rate of the model.

Therefore, the change is justified by the documentation. Finally, I did several tests with TJBot on a raspberry pi with and the results are much better with these settings.

Thanks, Jaime-

+3 -3

1 comment

1 changed file

jimbotel

pr closed time in 12 days

pull request commentibmtjbot/tjbotlib

change sample rate and number of channels for the microphone

Thanks for the detailed justification for this change and for testing. I will accept your PR.

jimbotel

comment created time in 12 days

PR closed ibmtjbot/tjbot

added bash_tests

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

Signed-off-by: Muthanna A. Alwahash mkhuthir@gmail.com

+523 -0

2 comments

27 changed files

mkhuthir

pr closed time in 15 days

fork chunyianliew/tjbotlib

Node.js library that abstracts basic functions for TJBot.

fork in 17 days

PR opened ibmtjbot/tjbotlib

change sample rate and number of channels for the microphone

I propose to change the sample rate to 16000 and the number of channels to 1, as it doesn't make much sense to use 44000 and 2 channels. Most microphones attached to a TJBot are cheap (low quality) we cannot expect to cover frequencies up to 22Khz accurately and will record in mono. Also, STT service recommends to:

https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-text-audio-formats

The service supports both broadband and narrowband audio for most languages and formats. It automatically adjusts the sampling rate of your audio to match the model that you specify before it recognizes speech.

  • For broadband models, the service converts audio recorded at higher sampling rates to 16 kHz.
  • For narrowband models, it converts the audio to 8 kHz.

In theory, you can send 44 kHz audio with a broadband or narrowband model, but that needlessly increases the size of the audio. To maximize the amount of audio that you can send, match the sampling rate of your audio to the model that you use. The service does not accept audio that is sampled at a rate that is less than the intrinsic sampling rate of the model.

Therefore, the change is justified by the documentation. Finally, I did several tests with TJBot on a raspberry pi with and the results are much better with these settings.

Thanks, Jaime-

+3 -3

0 comment

1 changed file

pr created time in 17 days

fork jimbotel/tjbotlib

Node.js library that abstracts basic functions for TJBot.

fork in 17 days

push eventibmtjbot/tjbot

Maryam Ashoori

commit sha f18c56368c3c3bd9095d0453856b88a7df2a60d9

Update README.md updated the link to Raspberry Pi

view details

push time in 21 days

push eventibmtjbot/tjbot

Maryam Ashoori

commit sha ed8896c245f4ac2a11806a2b82676a57f6c8a9ca

Update README.md

view details

push time in 23 days

push eventibmtjbot/tjbot

Maryam Ashoori

commit sha 021e0fbcf5c7eeef655dc7451fd6b36a415fa74c

Update README.md added the design files for 3D printing a mini TJbot

view details

push time in 23 days

issue commentibmtjbot/tjbot

Workspace ID Problem?

Were you able to figure this out?

imothyt

comment created time in a month

startedibmtjbot/tjbot

started time in 2 months

startedibmtjbot/tjbot

started time in 2 months

startedibmtjbot/tjbot

started time in 2 months

PR opened ibmtjbot/tjbotlib

Selection language FIX of the image reco…

…gnition function

+2 -2

0 comment

1 changed file

pr created time in 2 months

startedibmtjbot/tjbot

started time in 2 months

fork Engcompaulo/tjbotlib

Node.js library that abstracts basic functions for TJBot.

fork in 2 months

startedibmtjbot/tjbotlib

started time in 2 months

issue commentibmtjbot/tjbotlib

Update versions of pigpio and rpi-ws281x-native?

Sure thing... I determined the latest build by visiting the packages' pages on npm.

Changed the pigpio dependency declaration to: "pigpio": "^1.2.3",

And the rpi-ws281x-native declaration to" "rpi-ws281x-native": "^0.9.0",

Hope this helps...

stonebraker

comment created time in 2 months

startedibmtjbot/tjbot

started time in 3 months

issue commentibmtjbot/tjbotlib

Update versions of pigpio and rpi-ws281x-native?

Hello @stonebraker - would you mind posting the steps & commands used to update package.json to reference the latest versions of pigpio and rpi-ws281x-native pls?

stonebraker

comment created time in 3 months

startedibmtjbot/tjbot

started time in 3 months

issue openedibmtjbot/tjbotlib

Update versions of pigpio and rpi-ws281x-native?

I got my tjbot as a gift last year, but didn't get around to playing with him until now. My 11 year old nephew constructed and wired him without assistance. What an awesome experience for him. I, however, had a little more difficulty due to my late start. :-)

It would appear that the version of node installed with Raspbian Buster won't properly build the pigpio or rpi-ws281x-native modules. In other recipes I tried, I was able to update package.json to reference the latest versions of these. But I can't do that in the tjbot bootstrap module. I was able to fanangle it by building them separately and copying them into the node_modules folder, but that defeats the point of bootstrapping.

Just wanted to make this recommendation on behalf of any new tjbot users that might come along. I appreciate the work you guys have put into this. It's really cool and a great learning tool for him and me.

Thanks a ton!

created time in 3 months

issue commentibmtjbot/tjbot

npm install issues

Solution seemed to be this...

First I switched to Node 10.16.0 because I was receiving errors regarding building modules with different node versions and 10.16.0 was the recommended version.

For the pigpio issue sudo apt-get install pigpio

For the rpi-ws281x-native issue: I installed rpi-ws281x-native from source.

cd rpi-ws281x-native
npm install
node-gyp rebuild

I then copy pasted the resulting files into an rpi-ws281x-native directory I created in the node_modules directory.

After taking these steps, the tests/test.led.js script worked and the speech_to_text/stt.js script worked. Hope this helps anybody who might run into the same issues.

mframos3

comment created time in 3 months

issue commentibmtjbot/tjbot

npm install issues

Hi @jweisz and @mframos3, I am experiencing the exact same thing. Were either of you able to resolve this issue? I started this summer project with my nephew and would love to complete it. :-)

If you weren't able to resolve it, may I ask which version of Raspbian you are running? I am currently running Buster. Are there other libraries I should install?

I installed pigpio with apt-get. I used node v9.11.2 with npm 5.6.0 installed via nvm. Deleted the ~/.node-gyp folder as recommended by others having add-on build issues. Removed tjbot/bootstrap/tests/node_modules directory. npm install. sudo node test.led.js.

During the installation step and the execution step, I received the exact same output as @mframos3 pasted above.

Thank you very much for your assistance!

mframos3

comment created time in 3 months

issue closedibmtjbot/tjbot

Speech to Text Module Failing to Run

Hi, I'm attempting to run the SpeechToText module and it is failing. I will paste the output from my attempt to execute stt.js. The installation of the Speech to Text package produced some errors as well. It's very long. I'll paste it in a subsequent reply. Needless to say, pigpio and rpi-ws281x-native both failed to install properly.

I'm using a fresh pi from the adafruit tjbot kit. The sd card has been formatted, had noobs installed, then Raspbian (Buster), then the TJBot bootstrap (node v10.15.2, npm v5.8.0). I kept default names and locations. So this is super clean as far as I can tell. Please let me know if I missed a step.

Thanks in advance for your help! Jason

Output from execution of stt.js:

pi@raspberrypi:~/Desktop/tjbot/recipes/speech_to_text $ node stt.js internal/modules/cjs/loader.js:628 throw err; ^

Error: Cannot find module 'tjbot' Require stack:

  • /home/pi/Desktop/tjbot/recipes/speech_to_text/stt.js at Function.Module._resolveFilename (internal/modules/cjs/loader.js:625:15) at Function.Module._load (internal/modules/cjs/loader.js:527:27) at Module.require (internal/modules/cjs/loader.js:683:19) at require (internal/modules/cjs/helpers.js:16:16) at Object.<anonymous> (/home/pi/Desktop/tjbot/recipes/speech_to_text/stt.js:17:13) at Module._compile (internal/modules/cjs/loader.js:777:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:788:10) at Module.load (internal/modules/cjs/loader.js:643:32) at Function.Module._load (internal/modules/cjs/loader.js:556:12) at Function.Module.runMain (internal/modules/cjs/loader.js:840:10) { code: 'MODULE_NOT_FOUND', requireStack: [ '/home/pi/Desktop/tjbot/recipes/speech_to_text/stt.js' ] }

closed time in 3 months

stonebraker

issue commentibmtjbot/tjbot

Speech to Text Module Failing to Run

This hasn't been resolved. I'm closing it so I can ask a more specific helpful question.

stonebraker

comment created time in 3 months

issue commentibmtjbot/tjbot

Speech to Text Module Failing to Run

Output from npm install of the Speech to Text package:

pi@raspberrypi:~/Desktop/tjbot/recipes/speech_to_text $ sudo npm install

npm WARN npm npm does not support Node.js v10.15.2 npm WARN npm You should probably upgrade to a newer version of node as we npm WARN npm can't make any promises that npm will work with this version. npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9. npm WARN npm You can find the latest version at https://nodejs.org/ npm WARN deprecated watson-developer-cloud@3.18.4: DeprecationWarning: watson-developer-cloud moved to ibm-watson. To get updates, use the new package. npm WARN deprecated @types/form-data@2.5.0: This is a stub types definition. form-data provides its own type definitions, so you do not need this installed.

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

gyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/pi/Desktop/tjbot/recipes/speech_to_text/node_modules/pigpio/build' gyp ERR! System Linux 4.19.58-v7+ gyp ERR! command "/usr/bin/node" "/usr/bin/node-gyp" "rebuild" gyp ERR! cwd /home/pi/Desktop/tjbot/recipes/speech_to_text/node_modules/pigpio gyp ERR! node -v v10.15.2 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok

rpi-ws281x-native@0.8.2 install /home/pi/Desktop/tjbot/recipes/speech_to_text/node_modules/rpi-ws281x-native node-gyp rebuild

gyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/pi/Desktop/tjbot/recipes/speech_to_text/node_modules/rpi-ws281x-native/build' gyp ERR! System Linux 4.19.58-v7+ gyp ERR! command "/usr/bin/node" "/usr/bin/node-gyp" "rebuild" gyp ERR! cwd /home/pi/Desktop/tjbot/recipes/speech_to_text/node_modules/rpi-ws281x-native gyp ERR! node -v v10.15.2 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

gyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/pi/Desktop/tjbot/recipes/speech_to_text/node_modules/sleep/build' gyp ERR! System Linux 4.19.58-v7+ gyp ERR! command "/usr/bin/node" "/usr/bin/node-gyp" "rebuild" gyp ERR! cwd /home/pi/Desktop/tjbot/recipes/speech_to_text/node_modules/sleep gyp ERR! node -v v10.15.2 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"}) 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

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! sleep@5.2.4 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the sleep@5.2.4 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2019-07-24T18_59_55_967Z-debug.log

stonebraker

comment created time in 3 months

issue openedibmtjbot/tjbot

Speech to Text Module Failing to Run

Hi, I'm attempting to run the SpeechToText module and it is failing. I will paste the output from my attempt to execute stt.js. The installation of the Speech to Text package produced some errors as well. It's very long. I'll paste it in a subsequent reply. Needless to say, pigpio and rpi-ws281x-native both failed to install properly.

I'm using a fresh pi from the adafruit tjbot kit. The sd card has been formatted, had noobs installed, then Raspbian (Buster), then the TJBot bootstrap (node v10.15.2, npm v5.8.0). I kept default names and locations. So this is super clean as far as I can tell. Please let me know if I missed a step.

Thanks in advance for your help! Jason

Output from execution of stt.js: pi@raspberrypi:~/Desktop/tjbot/recipes/speech_to_text $ sudo node stt.js verbose: TJBot initializing LED internal/modules/cjs/loader.js:583 throw err; ^

Error: Cannot find module 'rpi-ws281x-native' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15) at Function.Module._load (internal/modules/cjs/loader.js:507:25) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18) at TJBot._setupLED (/home/pi/Desktop/tjbot/recipes/speech_to_text/node_modules/tjbot/lib/tjbot.js:230:18) at TJBot.<anonymous> (/home/pi/Desktop/tjbot/recipes/speech_to_text/node_modules/tjbot/lib/tjbot.js:63:18) at Array.forEach (<anonymous>) at new TJBot (/home/pi/Desktop/tjbot/recipes/speech_to_text/node_modules/tjbot/lib/tjbot.js:56:14) at Object.<anonymous> (/home/pi/Desktop/tjbot/recipes/speech_to_text/stt.js:34:10) at Module._compile (internal/modules/cjs/loader.js:689:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) at Module.load (internal/modules/cjs/loader.js:599:32) at tryModuleLoad (internal/modules/cjs/loader.js:538:12) at Function.Module._load (internal/modules/cjs/loader.js:530:3) at Function.Module.runMain (internal/modules/cjs/loader.js:742:12) at startup (internal/bootstrap/node.js:283:19)

created time in 3 months

fork shuren007/tjbotlib

Node.js library that abstracts basic functions for TJBot.

fork in 3 months

more