[Résolu] Installation gladys-voice, pb snowboy


#1

Bonjour,

En installation gladys-voice, j’ai un paquet d’erreurs sur le sudo npm install.
Du coup je ne peux pas modifier le fichier de sonus.

Une idée ?

[email protected]:~/gladys-voice $ sudo npm install
npm WARN deprecated [email protected]: catastrophic backtracking in regexes could potentially lead to REDOS attack, upgrade to 2.17.2 as soon as possible
npm WARN deprecated [email protected]: Use uuid module instead

[email protected] preinstall /home/pi/gladys-voice/node_modules/snowboy
npm install node-pre-gyp

npm ERR! path /root/.npm/_logs
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall scandir
npm ERR! Error: EACCES: permission denied, scandir ‘/root/.npm/_logs’
npm ERR! { Error: EACCES: permission denied, scandir ‘/root/.npm/_logs’
npm ERR! stack: ‘Error: EACCES: permission denied, scandir ‘/root/.npm/_logs’’,
npm ERR! errno: -13,
npm ERR! code: ‘EACCES’,
npm ERR! syscall: ‘scandir’,
npm ERR! path: ‘/root/.npm/_logs’ }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
glob error { Error: EACCES: permission denied, scandir ‘/root/.npm/_logs’
stack: ‘Error: EACCES: permission denied, scandir ‘/root/.npm/_logs’’,
errno: -13,
code: ‘EACCES’,
syscall: ‘scandir’,
path: ‘/root/.npm/_logs’ }
npm ERR! path /root/.npm/_cacache/index-v5/f6/d3/856f4e146dc3e8cb995652c4d6a1e16806d6bca7e87878fd9046e55ea74f
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall open
npm ERR! Error: EACCES: permission denied, open ‘/root/.npm/_cacache/index-v5/f6/d3/856f4e146dc3e8cb995652c4d6a1e16806d6bca7e87878fd9046e55ea74f’
npm ERR! { Error: EACCES: permission denied, open ‘/root/.npm/_cacache/index-v5/f6/d3/856f4e146dc3e8cb995652c4d6a1e16806d6bca7e87878fd9046e55ea74f’
npm ERR! cause:
npm ERR! { Error: EACCES: permission denied, open ‘/root/.npm/_cacache/index-v5/f6/d3/856f4e146dc3e8cb995652c4d6a1e16806d6bca7e87878fd9046e55ea74f’
npm ERR! errno: -13,
npm ERR! code: ‘EACCES’,
npm ERR! syscall: ‘open’,
npm ERR! path: ‘/root/.npm/_cacache/index-v5/f6/d3/856f4e146dc3e8cb995652c4d6a1e16806d6bca7e87878fd9046e55ea74f’ },
npm ERR! isOperational: true,
npm ERR! stack: ‘Error: EACCES: permission denied, open ‘/root/.npm/_cacache/index-v5/f6/d3/856f4e146dc3e8cb995652c4d6a1e16806d6bca7e87878fd9046e55ea74f’’,
npm ERR! errno: -13,
npm ERR! code: ‘EACCES’,
npm ERR! syscall: ‘open’,
npm ERR! path: ‘/root/.npm/_cacache/index-v5/f6/d3/856f4e146dc3e8cb995652c4d6a1e16806d6bca7e87878fd9046e55ea74f’ }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

┌───────────────────────────────────────────────────┐
│ npm update check failed │
│ Try running with sudo or get access │
│ to the local update config store via │
│ sudo chown -R $USER:$(id -gn $USER) /root/.config │
└───────────────────────────────────────────────────┘
npm WARN [email protected] No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 243
npm ERR! [email protected] preinstall: npm install node-pre-gyp
npm ERR! Exit status 243
npm ERR!
npm ERR! Failed at the [email protected] preinstall 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/2018-03-26T18_50_03_697Z-debug.log


#3

Yoh !

Ne lance pas le NPM install en tant que sudo. Ça devrait régler ton souci.


#4

En fait au départ je ne l’ai pas fait, et j’avais aussi le pb. Du coup j’ai essayé le sudo


#5

supprime ton dossier node_modules dans gladys-voice :slight_smile:

sudo rm -r node_modules

Ensuite redémarre ton raspberry. Pour éviter des problèmes (bien que ça n’ait pas de lien), et avoir un max de resources dispo, fais ensuite :

pm2 kill

enfin retournes dans ton dossier gladys-voice, et relances :

npm install

Redis-nous ce que ça donne.


#6

MErci pour ta réponse.

Gros crash :stuck_out_tongue:

COPY Release/grpc_node.node
COPY /home/pi/gladys-voice/node_modules/google-cloud/node_modules/grpc/src/node/extension_binary/grpc_node.node
TOUCH Release/obj.target/action_after_build.stamp
make: Leaving directory ‘/home/pi/gladys-voice/node_modules/google-cloud/node_modules/grpc/build’

[email protected] install /home/pi/gladys-voice/node_modules/snowboy
node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download(403): https://snowboy-release-node.s3-us-west-2.amazonaws.com/snowboy/v1.2.0/Release/snowboy-v1.2.0-node-v57-linux-arm.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v57 ABI, glibc) (falling back to source compile with node-gyp)
make: Entering directory ‘/home/pi/gladys-voice/node_modules/snowboy/build’
CXX(target) Release/obj.target/snowboy/swig/Node/snowboy.o
SOLINK_MODULE(target) Release/obj.target/snowboy.node
/usr/bin/ld: cannot find -lcblas
collect2: error: ld returned 1 exit status
snowboy.target.mk:131: recipe for target ‘Release/obj.target/snowboy.node’ failed
make: *** [Release/obj.target/snowboy.node] Error 1
make: Leaving directory ‘/home/pi/gladys-voice/node_modules/snowboy/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:258:23)
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.9.59-v7+
gyp ERR! command “/usr/local/bin/node” “/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “build” “–fallback-to-build” “–module=/home/pi/gladys-voice/node_modules/snowboy/lib/node/binding/Release/node-v57-linux-arm/snowboy.node” “–module_name=snowboy” “–module_path=/home/pi/gladys-voice/node_modules/snowboy/lib/node/binding/Release/node-v57-linux-arm”
gyp ERR! cwd /home/pi/gladys-voice/node_modules/snowboy
gyp ERR! node -v v8.9.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute ‘/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/pi/gladys-voice/node_modules/snowboy/lib/node/binding/Release/node-v57-linux-arm/snowboy.node --module_name=snowboy --module_path=/home/pi/gladys-voice/node_modules/snowboy/lib/node/binding/Release/node-v57-linux-arm’ (1)
node-pre-gyp ERR! stack at ChildProcess. (/home/pi/gladys-voice/node_modules/snowboy/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:126:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:214:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:925:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
node-pre-gyp ERR! System Linux 4.9.59-v7+
node-pre-gyp ERR! command “/usr/local/bin/node” “/home/pi/gladys-voice/node_modules/snowboy/node_modules/.bin/node-pre-gyp” “install” “–fallback-to-build”
node-pre-gyp ERR! cwd /home/pi/gladys-voice/node_modules/snowboy
node-pre-gyp ERR! node -v v8.9.4
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
node-pre-gyp ERR! not ok
Failed to execute ‘/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/pi/gladys-voice/node_modules/snowboy/lib/node/binding/Release/node-v57-linux-arm/snowboy.node --module_name=snowboy --module_path=/home/pi/gladys-voice/node_modules/snowboy/lib/node/binding/Release/node-v57-linux-arm’ (1)
npm WARN [email protected] No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

╭─────────────────────────────────────╮
│ │
│ Update available 5.6.0 → 5.8.0 │
│ Run npm i -g npm to update │
│ │
╰─────────────────────────────────────╯

npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2018-03-27T16_38_10_466Z-debug.log


#7

-> sudo apt-get install libmagic-dev libatlas-base-dev


#8

Bizarre, maintenant gladys-voice reboot en boucle.

Je suis bien en ARMv7
Le test d’enregistrement dans le fichier wav fonctionne bien.
J’ai bien placé le fichier gladys-speech.json

0|gladys-v | Error: spawn rec ENOENT
0|gladys-v | at _errnoException (util.js:1022:11)
0|gladys-v | at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
0|gladys-v | at onErrorNT (internal/child_process.js:372:16)
0|gladys-v | at _combinedTickCallback (internal/process/next_tick.js:138:11)
0|gladys-v | at process._tickDomainCallback (internal/process/next_tick.js:218:9)
0|gladys-v | at Function.Module.runMain (module.js:686:11)
0|gladys-v | at startup (bootstrap_node.js:187:16)
0|gladys-v | at bootstrap_node.js:608:3
PM2 | App [gladys-voice] with id [0] and pid [20205], exited with code [1] via signal [SIGINT]
PM2 | Starting execution sequence in -fork mode- for app name:gladys-voice id:0
PM2 | App name:gladys-voice id:0 online

Le fichier de conf :
module.exports = {
snowboy: {
hotword: process.env.RECOGNITION_HOTWORD || ‘gladys’,
resource: process.env.RECOGNITION_RESOURCE || ‘./data/gladys.pmdl’,
sensitivity: process.env.RECOGNITION_SENSITIVITY || ‘0.5’
},
google: {
projectId: process.env.GOOGLE_PROJECT_ID || ‘gladys-174316’,
keyFilename: process.env.GOOGLE_KEY_FILENAME || ‘./data/gladys-speech.json’
},
language: process.env.RECOGNITION_LANGUAGE ||‘fr-FR’,
gladys: {
gladysUrl: process.env.GLADYS_URL || ‘http://192.168.1.14:8080’,
token: process.env.GLADYS_TOKEN || ‘4d2933f00de71f7f04279b4de9a7c12f7290fb84’

},
sound: process.env.RECOGNITION_SOUND || './data/affirmative.mp3'

};


#9

Je m’auto réponds, ça peut servir à d’autres !

Il faut exécuter la commande suivante, qui n’est pas indiquée dans le tuto :

sudo apt-get install sox libsox-fmt-all libatlas-base-dev mpg321


#10

Hello !

Elle est bien sur le README de Gladys voice! tu parle de quel tuto ?


#11

Arf, bein j’ai suivi le tuto (Super bien fait au passage) sans lire les informations sur le module ^^

https://community.gladysassistant.com/t/tutoriel-gladys-et-la-reconnaissance-vocale/1419


#12

Salut @Fl0r_an,

L’info est bien dans le tuto :wink: c’est même la première chose que tu fait :stuck_out_tongue:


#13

Ah en effet !
Je pense que je ne l’ai pas fait car c’est noté “Micro USB”. Le mien étant branché sur les pins du rpi, j’ai sauté l’étape :smile: