]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
stream : update build instructions
authorGeorgi Gerganov <redacted>
Sun, 15 Dec 2024 19:55:36 +0000 (21:55 +0200)
committerGeorgi Gerganov <redacted>
Sun, 15 Dec 2024 19:55:36 +0000 (21:55 +0200)
examples/stream/README.md

index de5e5a7810d5d56781b6126f8bd767eeb5bfaef9..9c558cd3c91d84edb191bf55289737b7f5f58885 100644 (file)
@@ -5,7 +5,7 @@ The `stream` tool samples the audio every half a second and runs the transcripti
 More info is available in [issue #10](https://github.com/ggerganov/whisper.cpp/issues/10).\r
 \r
 ```bash\r
-./stream -m ./models/ggml-base.en.bin -t 8 --step 500 --length 5000\r
+./build/bin/stream -m ./models/ggml-base.en.bin -t 8 --step 500 --length 5000\r
 ```\r
 \r
 https://user-images.githubusercontent.com/1991296/194935793-76afede7-cfa8-48d8-a80f-28ba83be7d09.mp4\r
@@ -15,7 +15,7 @@ https://user-images.githubusercontent.com/1991296/194935793-76afede7-cfa8-48d8-a
 Setting the `--step` argument to `0` enables the sliding window mode:\r
 \r
 ```bash\r
- ./stream -m ./models/ggml-small.en.bin -t 6 --step 0 --length 30000 -vth 0.6\r
+ ./build/bin/stream -m ./models/ggml-small.en.bin -t 6 --step 0 --length 30000 -vth 0.6\r
 ```\r
 \r
 In this mode, the tool will transcribe only after some speech activity is detected. A very\r
@@ -40,21 +40,10 @@ sudo dnf install SDL2 SDL2-devel
 # Install SDL2 on Mac OS\r
 brew install sdl2\r
 \r
-make stream\r
-```\r
-\r
-Ensure you are at the root of the repo when running `make stream`. Not within the `examples/stream` dir\r
-as the libraries needed like `common-sdl.h` are located within `examples`. Attempting to compile within\r
-`examples/steam` means your compiler cannot find them and it gives an error it cannot find the file.\r
+cmake -B build -DWHISPER_SDL2=ON\r
+cmake --build build --config Release\r
 \r
-```bash\r
-whisper.cpp/examples/stream$ make stream\r
-g++     stream.cpp   -o stream\r
-stream.cpp:6:10: fatal error: common/sdl.h: No such file or directory\r
-    6 | #include "common/sdl.h"\r
-      |          ^~~~~~~~~~~~~~\r
-compilation terminated.\r
-make: *** [<builtin>: stream] Error 1\r
+./build/bin/stream\r
 ```\r
 \r
 ## Web version\r