alphacep / alphacep/vosk-api

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

Abierto
#596 7 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Jupyter Notebook
Estrellas
15.1k
Forks
1.8k
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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?

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.