Closed pepperkick closed 7 years ago
Typically those errors come from missing dependencies, but since you have them installed already, it's possible your PATH is missing something. Have you tried building the module locally?
npm install snowboy --build-from-source
Thanks for quick response!
Here's my PATH variable, don't what should be there for snowboy
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
npm install snowboy --build-from-source
Still gives the same error.
Here's a snippet of my code if it helps (and forgot to write it)
const snowboy = require('snowboy');
const Detector = snowboy.Detector;
const Models = snowboy.Models;
var models = new Models();
models.add({
file: __dirname + "/../utils/Baymax.pmdl",
sensitivity: '0.5',
hotwords : 'baymax'
});
const detector = new Detector({
resource: __dirname + "/../utils/common.res",
models: models,
audioGain: 2.0
});
detector.on('silence', function () {
console.log('silence');
});
detector.on('sound', function () {
console.log('sound');
});
detector.on('error', function () {
console.log('error');
});
detector.on('hotword', function (index, hotword) {
console.log('hotword', index, hotword);
});
detector.write(/*PCM data*/);
Update
So after finding no solution I tried a complete fresh Debian through DigitalOcean droplet and here is a new issue I get when I start.
module.js:598
return process.dlopen(module, path._makeLong(filename));
^
Error: /home/steam/apps/BaymaxBackup/node_modules/snowboy/lib/node/binding/Release/node-v51-linux-ia32/snowboy.node: undefined symbol: _ZN7snowboy13SnowboyDetectD1Ev
at Object.Module._extensions..node (module.js:598:18)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/home/steam/apps/BaymaxBackup/node_modules/snowboy/lib/node/index.js:7:29)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/home/steam/apps/BaymaxBackup/server/boot/modules/admintools.js:5:23)
at Module._compile (module.js:571:32)
Line at admintools.js:5
const snowboy = require('snowboy');
I tried both of this
npm install snowboy --build-from-source
sudo apt-get install libmagic-dev libatlas-base-dev
Nodejs : 7.3.0 NPM : 3.10.10
@evancohen can correct me, but we only build Snowboy for Node 4, 5, 6, so that might be the issue. We will add Node 7 support in the future release. In the meanwhile, you can also try to build from the Snowboy repository: https://github.com/Kitt-AI/snowboy
@evancohen Thanks! v7 was the issue (should have mentioned that in first post, sorry). Downgrading to v6.9.4 fixed the error and detects the hotword!
I have similar problem on both Wheezy and Jessie, node 6 & 7, on Intel Edison, no matter what version of node I am using.
Tried even with removing all node_modules and reinstall:
apt-get install --reinstall libmagic-dev libatlas-base-dev swig3.0 python-pyaudio python3-pyaudio sox
module.js:597
return process.dlopen(module, path._makeLong(filename));
^
Error: /home/alexa/test/node_modules/snowboy/lib/node/binding/Release/node-v48-linux-ia32/snowboy.node: undefined symbol: _ZN7snowboy13SnowboyDetectD1Ev
at Error (native)
at Object.Module._extensions..node (module.js:597:18)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/home/alexa/test/node_modules/snowboy/lib/node/index.js:7:29)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
module.js:597
return process.dlopen(module, path._makeLong(filename));
^
Error: /home/alexa/test/node_modules/snowboy/lib/node/binding/Release/node-v51-linux-ia32/snowboy.node: undefined symbol: _ZN7snowboy13SnowboyDetectD1Ev
at Object.Module._extensions..node (module.js:598:18)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/home/alexa/test/node_modules/snowboy/lib/node/index.js:7:29)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
@Baael the issue might be the mismatch of the underlying library. We recently built the C++ library for Intel Edison on Ubilinux, but I don't think we've built the node module for that. You could try the C++ library here snowboy/lib/edison/ first just to make sure if the build works on your Intel Edison with Wheezy or Jessie, and if it does, you can build the node module by yourself following https://github.com/Kitt-AI/snowboy#compile-a-node-addon. Note that this needs a little bit of understanding of the code, as you may have to modify it to point it to the right library.
Having the same issue on Raspberry Pi.
I have already tried 'npm install snowboy --build-from-source' and installed the dependencies, still sees the error. I also tried to switch to node v6.9.4, not working.
But it works on my MACBOOK with node v10.15.3. So I switch to the same node version on Raspberry Pi, still not working.
The last reply is already two years ago... any solution now?
@shihengW There are two issues reported in this thread, one for process.dlopen
and another for nodejs: symbol lookup error
, which one are you experiencing?
Some ideas: try using snowboy version 1.2.0
with node 6.9.4
npm install snowboy@1.2.0 --build-from-source
You may also want to try not using the --build-from-source
flag first, there should be precompiled binaries for the version combination I mentioned above.
@evancohen With reference to #584, I've tried using Snowboy 1.2.0
with node 6.9.4
as you suggested but the same error comes out.
@evancohen I am experiencing the nodejs: symbol lookup error
issue. I belive @carloposo facing the same issue as he mentioned in #584 .
@evancohen Does Snowboy work on Raspbian Jessie (8) only?
You might have to compile it on your own, but it should work for any version of Raspbian. I've compiled new binaries on the @sonus
tag using Raspbian Stretch. Try:
npm install snowboy@sonus
I have this issue with node whenever snowby tries to detect something.
nodejs: symbol lookup error: /mnt/f/Projects/Baymax/node_modules/snowboy/lib/node/binding/Release/node-v51-linux-x64/snowboy.node: undefined symbol: cblas_sdot
I already tried the solutions of 2 issues with same problem, but it still shows me this error.
Fresh Windows Bash Ubuntu 16.04 Packages installed: nodejs, npm, make, ffmpeg, libatlas-base-dev, libmagic-dev etc