Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem: whisper.cpp not initialized in nextjs project #45

Open
MatheusAntonioF opened this issue Mar 5, 2024 · 1 comment
Open

Problem: whisper.cpp not initialized in nextjs project #45

MatheusAntonioF opened this issue Mar 5, 2024 · 1 comment

Comments

@MatheusAntonioF
Copy link

Problem

When using this library in a Nextjs project v14, and executing it in a server component I'm receiving this error
I already follow the README.md and executed the command: bunx whisper-node download

Error

cd: no such file or directory: project/.next/server/lib/whisper.cpp
[whisper-node] Problem. whisper.cpp not initialized. Current shelljs directory: project/.next/server/vendor-chunks
[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:  project/.next/server/vendor-chunks

Any thoughts about this? Does this library support running with nextjs?

Thanks!

Versions

  • Pop!_OS 22.04 LTS
  • Bun version 1.0.29
  • Next.js version 14.1.0
@loudar
Copy link

loudar commented Apr 28, 2024

Same issue here on Windows.

Tried running the make myself within the directory where whisper.cpp lies, but no success:

Got as far as using cygwin to resolve errors that couldn't find cc, g++ and head (and then adding those dirs to path), but still getting errors I can't really wrap my head around to:

g++ -I. -I./examples -O3 -DNDEBUG -std=c++11 -fPIC -D_XOPEN_SOURCE=600 examples/bench/bench.cpp ggml.o ggml-alloc.o ggml-backend.o ggml-quants.o whisper.o -o bench
g++ -I. -I./examples -O3 -DNDEBUG -std=c++11 -fPIC -D_XOPEN_SOURCE=600 examples/quantize/quantize.cpp examples/common.cpp examples/common-ggml.cpp ggml.o ggml-alloc.o ggml-backend.o ggml-quants.o whisper.o -o quantize
g++ -I. -I./examples -O3 -DNDEBUG -std=c++11 -fPIC -D_XOPEN_SOURCE=600 examples/server/server.cpp examples/common.cpp examples/common-ggml.cpp ggml.o ggml-alloc.o ggml-backend.o ggml-quants.o whisper.o -o server
C:/ghcup/ghc/8.10.7/mingw/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\user\AppData\Local\Temp\cciwJ6to.o:server.cpp:(.text+0x45a): undefined reference to `__imp_WSACleanup'
C:/ghcup/ghc/8.10.7/mingw/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\user\AppData\Local\Temp\cciwJ6to.o:server.cpp:(.text+0xab4): undefined reference to `__imp_select'
C:/ghcup/ghc/8.10.7/mingw/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\user\AppData\Local\Temp\cciwJ6to.o:server.cpp:(.text$_ZN7httplib22default_socket_optionsEy[_ZN7httplib22default_socket_optionsEy]+0xb): undefined reference to `__imp_setsockopt'
C:/ghcup/ghc/8.10.7/mingw/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\user\AppData\Local\Temp\cciwJ6to.o:server.cpp:(.text$_ZN7httplib6detail12SocketStream4readEPcy[_ZN7httplib6detail12SocketStream4readEPcy]+0xe1): undefined reference to `__imp_select'
[etc...]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants