alphacep / alphacep/vosk-api

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

未关闭
#596 7 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Jupyter Notebook
星标
15.1k
派生
1.8k
PR 合并指标
30 天内没有已合并 PR

描述

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?

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。