alphacep / vosk-api

Offline speech recognition API for Android, iOS, Raspberry Pi and servers with Python, Java, C# and Node
Apache License 2.0
7.37k stars 1.04k forks source link

Installing vosk on Windows 11 - ffi-napi problem #1465

Closed tansyxiao closed 7 months ago

tansyxiao commented 7 months ago

Trying to get a node.js Vosk project that was initially built on Mac to work on a Windows machine. Here's the log. error log.log

nshmyrev commented 7 months ago

Its ffi-napi bug, not vosk. Pretty common on the web, for example here:

https://stackoverflow.com/questions/54532854/error-c-program-files-x86-microsoft-visual-studio-2017-buildtools-msbuild-1

C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1

something wrong with your build environment

tansyxiao commented 7 months ago

Solved by 1. uninstalling the current version of node.js; 2. using nvm windows to downgrade node.js to v11.15.0 (any version prior to this is not compatible with vosk for some reason, but this one works); 3. same old npm install vosk. On a separate note, didn't realize that Windows has to use a .exe install file for SoX, the npm installed one didn't work for SoX for some reason.