Open himat opened 3 years ago
Hi
before running demo/test_simple.js
, did you run a npm install
on the node base directory?
The error could suggest the lack of the ffi-napi module.
Also, download a model.
Yes, I already did a yarn install
in the vosk-api/nodejs
directory.
And I do have the vosk-model-small-en-us-0.15 model in the same folder at vosk-api/nodejs/model
and also in `vosk-api/nodejs/model/demo
The error shows that it's look for the dll in the wrong folder.
Ok I tried the same test_simple.js file but in a separate directory where I installed vosk from npm and that worked properly. So I think probably your demo code needs to be updated when it's being run from within the folder.
A valid issue.
I don't see a real problem here to be honest.
Ok I tried the same test_simple.js file but in a separate directory where I installed vosk from npm and that worked properly. So I think probably your demo code needs to be updated when it's being run from within the folder.
Yes. IMMO there are two way to use/test vosk:
A. you git clone this repo, so you have to:
npm install
in the nodejs home directory (where the package.json is)cd demo && node ....
run demo program FROM the demo directory. Because the vosk package is here included from the parent duirectory include ('..')B. you create your application (separate) directory and here you do a npm install vosk
A. you git clone this repo, so you have to:
- do
npm install
in the nodejs home directory (where the package.json is)- do
cd demo && node ....
run demo program FROM the demo directory. Because the vosk package is here included from the parent duirectory include ('..')
this doesn't work now, because it expects precompiled libs in lib folder. I shall try to fix it.
Is this still the case or has this been resolved? I'm still getting the dynamic linking error.
I downloaded this
vosk-api
repo, and after installing vosk withpip3 install vosk
, I then tried out the nodejs bindings. But the sample code failed to run:Specifically, it's strange that it's looking for the .dylib file within this vosk-api directory
/Users/hima/Downloads/vosk-api/nodejs/lib/osx-x86_64/libvosk.dylib
. There is no suchlib/
folder in this repo. Shouldn't it be looking for the dylib somewhere in my root system (such as where the pip installed package is)?I did find where where pip installed package is by the way, but there is no .dylib file there either. There is a .dyld file though.
How do I fix this?