ariym / whisper-node

Node.js bindings for OpenAI's Whisper. (C++ CPU version by ggerganov)
https://npmjs.com/whisper-node
MIT License
239 stars 41 forks source link

Problem. 'make' command failed. #15

Closed Ronak0020 closed 1 year ago

Ronak0020 commented 1 year ago

Hello! this is actually my first time using this so I am not sure if I am doing this right but I followed the steps and installed the package and then installed the large.bin model. when Model was downloaded and it was compiling, it threw error:

Downloading ggml model large...
Done! Model large saved in G:\DiscordPaidBots\DiscordPaidBots\excalibura\node_modules\whisper-node\lib\whisper.cpp\models\ggml-large.bin
You can now use it like this:
main.exe -m G:\DiscordPaidBots\DiscordPaidBots\excalibura\node_modules\whisper-node\lib\whisper.cpp\models\ggml-large.bin -f G:\DiscordPaidBots\DiscordPaidBots\excalibura\node_modules\whisper-node\lib\whisper.cpp\samples\jfk.wav
[whisper-node] Attempting to compile model...
process_begin: CreateProcess(NULL, uname -s, ...) failed.
Makefile:2: pipe: No error
process_begin: CreateProcess(NULL, uname -p, ...) failed.
Makefile:6: pipe: No error
process_begin: CreateProcess(NULL, uname -m, ...) failed.
Makefile:10: pipe: No error
/usr/bin/bash: cc: command not found
I whisper.cpp build info: 
I UNAME_S:
I UNAME_P:
I UNAME_M:
I CFLAGS:   -I.              -O3 -std=c11   -fPIC -mfma -mf16c -mavx -mavx2
I CXXFLAGS: -I. -I./examples -O3 -std=c++11 -fPIC
I LDFLAGS:
I CC:
I CXX:      g++.exe (GCC) 11.2.0

cc  -I.              -O3 -std=c11   -fPIC -mfma -mf16c -mavx -mavx2   -c ggml.c -o ggml.o
process_begin: CreateProcess(NULL, cc -I. -O3 -std=c11 -fPIC -mfma -mf16c -mavx -mavx2 -c ggml.c -o ggml.o, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [Makefile:176: ggml.o] Error 2

Then I tried to launch my nodejs app and it said:

[whisper-node] Problem. whisper.cpp not initialized. Current shelljs directory:  G:\DiscordPaidBots\DiscordPaidBots\excalibura\node_modules\whisper-node\dist
[whisper-node] Attempting to run 'make' command in /whisper directory...
[whisper-node] Problem. 'make' command failed. Please run 'make' command in /whisper directory. Current shelljs directory:  G:\DiscordPaidBots\DiscordPaidBots\excalibura\node_modules\whisper-node\dist

And when I tried to run make command in node_modules/whisper-node/lib/whisper.cc as this was the only pace where Makefile was, it gave me this error:

process_begin: CreateProcess(NULL, uname -s, ...) failed.
Makefile:2: pipe: No error
process_begin: CreateProcess(NULL, uname -p, ...) failed.
Makefile:6: pipe: No error
process_begin: CreateProcess(NULL, uname -m, ...) failed.
Makefile:10: pipe: No error
I whisper.cpp build info:
I UNAME_S:
I UNAME_P:
I UNAME_M:
I CFLAGS:   -I.              -O3 -std=c11   -fPIC -mfma -mf16c -mavx -mavx2
I CXXFLAGS: -I. -I./examples -O3 -std=c++11 -fPIC
I LDFLAGS:
I CC:       gcc.exe (GCC) 11.2.0
I CXX:      g++.exe (GCC) 11.2.0

g++ -I. -I./examples -O3 -std=c++11 -fPIC examples/main/main.cpp ggml.o whisper.o -o main
./main -h

usage: ./main [options] file0.wav file1.wav ...
options:
 -h,       --help           [default] show this help message and exit
  -t N,     --threads N      [4      ] number of threads to use during computation
  -p N,     --processors N   [1      ] number of processors to use during computation
  -ot N,    --offset-t N     [0      ] time offset in milliseconds
.
.
.
.
-f FNAME, --file FNAME     [       ] input WAV file path

Is there any fix for this? Or is there something I am doing incorrect? I am using Windows btw. NodeJS version 18.16.1 GNU make v4.4.1 gcc v11.2.0

I appreciate any kind of support.

AntonPolyakin commented 1 year ago

Same problem

Ronak0020 commented 1 year ago

Apparently, installing it on linux worked, I used Windows Subsystem for Linux (WSL) and the code seems to be working fine in linux. Haven't found a fix for windows yet. I tried to look for it everywhere I could but no luck.

dylan0356 commented 1 year ago

Still broken on mac as well

ariym commented 1 year ago

make command has a windows version. Here is a guide: https://gnuwin32.sourceforge.net/packages/make.htm

ariym commented 1 year ago

Still broken on mac as well

The link to download the models was temporarily out of date and is unrelated to this Windows issue.