alphacep / alphacep/vosk-api

nodejs api dynamic linking error - looking for dylib in wrong place

Aperta
#596 7 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Jupyter Notebook
Stelle
15.1k
Fork
1.8k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I downloaded this `vosk-api` repo, and after installing vosk with `pip3 install vosk`, I then tried out the nodejs bindings.
But the sample code failed to run:

```
❯ node demo/test_simple.js
/Users/hima/Downloads/vosk-api/nodejs/node_modules/ffi-napi/lib/dynamic_library.js:75
throw new Error('Dynamic Linking Error: ' + err);
^

Error: Dynamic Linking Error: dlopen(/Users/hima/Downloads/vosk-api/nodejs/lib/osx-x86_64/libvosk.dylib, 2): image not found
at new DynamicLibrary (/Users/hima/Downloads/vosk-api/nodejs/node_modules/ffi-napi/lib/dynamic_library.js:75:11)
at Object.Library (/Users/hima/Downloads/vosk-api/nodejs/node_modules/ffi-napi/lib/library.js:47:10)
at Object. (/Users/hima/Downloads/vosk-api/nodejs/index.js:84:21)
at Module._compile (internal/modules/cjs/loader.js:1068:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
at Module.load (internal/modules/cjs/loader.js:933:32)
at Function.Module._load (internal/modules/cjs/loader.js:774:14)
at Module.require (internal/modules/cjs/loader.js:957:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object. (/Users/hima/Downloads/vosk-api/nodejs/demo/test_simple.js:1:12)
```

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 such `lib/` 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.
```
❯ ls /Users/hima/anaconda/lib/python3.6/site-packages/vosk
__init__.py __pycache__/ libvosk.dyld* vosk_cffi.py
```

How do I fix this?

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.