alphacep / alphacep/vosk-api

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

Đang mở
#596 7 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Jupyter Notebook
Star
15.1k
Fork
1.8k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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?

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.