ffi-napi problem - Installing vosk (node.js) on Windows 11

176 views Asked by At

I tried a few things mentioned in this post. The npm install --global windows-build-tools command no longer works. Switching to python 2.7, cache clean then npm install, or reinstalling node.js also didn't help.

Any suggestions?

the site doesn't allow me to post a longer error log, here are some parts:

164 error gyp info it worked if it ends with ok
164 error gyp info using [email protected]
164 error gyp info using [email protected] | win32 | x64
164 error gyp info find Python using Python version 3.12.0 found at "C:\Users\Harvestworks\AppData\Local\Programs\Python\Python312\python.exe"
164 error gyp info find VS using VS2022 (17.7.34221.43) found at:
164 error gyp info find VS "C:\Program Files\Microsoft Visual Studio\2022\Community"
164 error gyp info find VS run with --verbose for detailed information

Download the entire log

1

There are 1 answers

0
sooon On

Hope this is not too late. i had the same issue, after hours of digging, these few things i did got it to work:

  1. use vosk package from npm, then require('vosk') in the test_xxx.js file directly.
  2. downloaded model at the root directory(same as package.json)
  3. nodejs using mic package, which need arecord(linux) or sox(mac/windows) installed. check the mic github page for details. In my case, this seems to be the culprit that cause the ffi-napi problem.

after these, everything works accordingly.

however, I found that the speed is slower, and not as accurate as the python counter part.

I am using Mac by the way.