whisper.cpp
whisper.cpp copied to clipboard
Trying to get examples/command working on Mac
Hi I've messed around a bit with xcode and SDL Mac etc but I'm flying blind -- what's the easiest way to get the examples/command running on iOS (M1)?
Xcode is not supported at the moment.
The easiest way to run the examples/command is:
# install sdl2 library if you don't have it already
brew install sdl2
# clone whisper.cpp repo
git clone https://github.com/ggerganov/whisper.cpp
cd whisper.cpp
# download model
./models/download-ggml-model.sh base.en
# build the "command" example
make command
# run it
./command
Very helpful thank you! Do you know a way to create new pretrained models? There’s always fine-tuning but for wake word detection it feels like there’s an opportunity to build an even smaller one than “tiny”. You really only need a binary classifier in the end: was the wake word detected or not? Whisper could still be useful for intent/ NLU / Commabd identification though.
On Thu, 29 Dec 2022 at 12:07, Georgi Gerganov @.***> wrote:
Xcode is not supported at the moment.
The easiest way to run the examples/command is:
install sdl2 library if you don't have it already
brew install sdl2
clone whisper.cpp repo
git clone https://github.com/ggerganov/whisper.cppcd whisper.cpp
download model
./models/download-ggml-model.sh base.en
build the "command" example
make command
run it
./command
— Reply to this email directly, view it on GitHub https://github.com/ggerganov/whisper.cpp/issues/342#issuecomment-1367274523, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABD62IGKNJRC464OIMYZK3WPV5H5ANCNFSM6AAAAAATLNWUIU . You are receiving this because you authored the thread.Message ID: @.***>
@boxabirds
No - I'm not familiar with the training process yet. It would be very cool to have a way to create "micro" models for wake word detection, but I don't know the details of how one can achieve this and how effective it would be.
I'm trying to compile this for a MacBook Pro with M2 silicon, using the example above. Brew, clone and download model were OK. The example says Xcode not supported at the moment, and when I type 'make command' the compiler throws up lots of Xcode errors and aborts eg:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/14.0.0/include/mmintrin.h:314:19: error: use of undeclared identifier '__builtin_ia32_punpcklwd' return (__m64)__builtin_ia32_punpcklwd((__v4hi)__m1, (__v4hi)__m2); ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/14.0.0/include/mmintrin.h:335:19: error: use of undeclared identifier '__builtin_ia32_punpckldq' return (__m64)__builtin_ia32_punpckldq((__v2si)__m1, (__v2si)__m2); ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. make: *** [command] Error 1
Apologies - I'm a bit of a newbie at this - How do I stop it trying to use Xcode?
ran into the same issues This worked for me. In the whisper directory run the following three commands, this should build the main example for you.
cc -I. -O3 -std=c11 -pthread -DGGML_USE_ACCELERATE -c ggml.c -o ggml.o c++ -I. -I./examples -O3 -std=c++11 -pthread -c whisper.cpp -o whisper.o c++ -I. -I./examples -O3 -std=c++11 -pthread examples/main/main.cpp ggml.o whisper.o -o main -framework Accelerate
Thanks https://github.com/paradoxewan Your three commands executed without error, but 'command' is not yet created. Why is the last step I have to do, please?
Aha - looking at the directory I believe I can run ./main -f samples/jfk.wav - yes it worked, printing out the text. Thanks for your help - it's great to get advice from those of you that fully understand all this !