alphacep / alphacep/vosk-api

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

Ouverte
#596 7 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Jupyter Notebook
Étoiles
15.1k
Forks
1.8k
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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?

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.