ggerganov commited on
Commit
d1e543b
·
1 Parent(s): fcafd21

readme : update build instructions

Browse files
Files changed (1) hide show
  1. README.md +19 -37
README.md CHANGED
@@ -89,10 +89,11 @@ Now build the [main](examples/main) example and transcribe an audio file like th
89
 
90
  ```bash
91
  # build the main example
92
- make -j
 
93
 
94
  # transcribe an audio file
95
- ./main -f samples/jfk.wav
96
  ```
97
 
98
  ---
@@ -265,11 +266,12 @@ Here are the steps for creating and using a quantized model:
265
 
266
  ```bash
267
  # quantize a model with Q5_0 method
268
- make -j quantize
269
- ./quantize models/ggml-base.en.bin models/ggml-base.en-q5_0.bin q5_0
 
270
 
271
  # run the examples as usual, specifying the quantized model file
272
- ./main -m models/ggml-base.en-q5_0.bin ./samples/gb0.wav
273
  ```
274
 
275
  ## Core ML support
@@ -303,10 +305,6 @@ speed-up - more than x3 faster compared with CPU-only execution. Here are the in
303
  - Build `whisper.cpp` with Core ML support:
304
 
305
  ```bash
306
- # using Makefile
307
- make clean
308
- WHISPER_COREML=1 make -j
309
-
310
  # using CMake
311
  cmake -B build -DWHISPER_COREML=1
312
  cmake --build build -j --config Release
@@ -426,8 +424,8 @@ First, make sure you have installed `cuda`: https://developer.nvidia.com/cuda-do
426
  Now build `whisper.cpp` with CUDA support:
427
 
428
  ```
429
- make clean
430
- GGML_CUDA=1 make -j
431
  ```
432
 
433
  ## Vulkan GPU support
@@ -436,8 +434,8 @@ First, make sure your graphics card driver provides support for Vulkan API.
436
 
437
  Now build `whisper.cpp` with Vulkan support:
438
  ```
439
- make clean
440
- make GGML_VULKAN=1 -j
441
  ```
442
 
443
  ## BLAS CPU support via OpenBLAS
@@ -448,28 +446,13 @@ First, make sure you have installed `openblas`: https://www.openblas.net/
448
  Now build `whisper.cpp` with OpenBLAS support:
449
 
450
  ```
451
- make clean
452
- GGML_OPENBLAS=1 make -j
453
- ```
454
-
455
- ## BLAS CPU support via Intel MKL
456
-
457
- Encoder processing can be accelerated on the CPU via the BLAS compatible interface of Intel's Math Kernel Library.
458
- First, make sure you have installed Intel's MKL runtime and development packages: https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl-download.html
459
-
460
- Now build `whisper.cpp` with Intel MKL BLAS support:
461
-
462
- ```
463
- source /opt/intel/oneapi/setvars.sh
464
- mkdir build
465
- cd build
466
- cmake -DWHISPER_MKL=ON ..
467
- WHISPER_MKL=1 make -j
468
  ```
469
 
470
  ## Ascend NPU support
471
 
472
- Ascend NPU provides inference acceleration via [`CANN`](https://www.hiascend.com/en/software/cann) and AI cores.
473
 
474
  First, check if your Ascend NPU device is supported:
475
 
@@ -483,10 +466,8 @@ Then, make sure you have installed [`CANN toolkit`](https://www.hiascend.com/en/
483
  Now build `whisper.cpp` with CANN support:
484
 
485
  ```
486
- mkdir build
487
- cd build
488
- cmake .. -D GGML_CANN=on
489
- make -j
490
  ```
491
 
492
  Run the inference examples as usual, for example:
@@ -636,8 +617,9 @@ The [stream](examples/stream) tool samples the audio every half a second and run
636
  More info is available in [issue #10](https://github.com/ggerganov/whisper.cpp/issues/10).
637
 
638
  ```bash
639
- make stream -j
640
- ./stream -m ./models/ggml-base.en.bin -t 8 --step 500 --length 5000
 
641
  ```
642
 
643
  https://user-images.githubusercontent.com/1991296/194935793-76afede7-cfa8-48d8-a80f-28ba83be7d09.mp4
 
89
 
90
  ```bash
91
  # build the main example
92
+ cmake -B build
93
+ cmake --build build --config Release
94
 
95
  # transcribe an audio file
96
+ ./build/bin/main -f samples/jfk.wav
97
  ```
98
 
99
  ---
 
266
 
267
  ```bash
268
  # quantize a model with Q5_0 method
269
+ cmake -B build
270
+ cmake --build build --config Release
271
+ ./build/bin/quantize models/ggml-base.en.bin models/ggml-base.en-q5_0.bin q5_0
272
 
273
  # run the examples as usual, specifying the quantized model file
274
+ ./build/bin/main -m models/ggml-base.en-q5_0.bin ./samples/gb0.wav
275
  ```
276
 
277
  ## Core ML support
 
305
  - Build `whisper.cpp` with Core ML support:
306
 
307
  ```bash
 
 
 
 
308
  # using CMake
309
  cmake -B build -DWHISPER_COREML=1
310
  cmake --build build -j --config Release
 
424
  Now build `whisper.cpp` with CUDA support:
425
 
426
  ```
427
+ cmake -B build -DGGML_CUDA=1
428
+ cmake --build build -j --config Release
429
  ```
430
 
431
  ## Vulkan GPU support
 
434
 
435
  Now build `whisper.cpp` with Vulkan support:
436
  ```
437
+ cmake -B build -DGGML_VULKAN=1
438
+ cmake --build build -j --config Release
439
  ```
440
 
441
  ## BLAS CPU support via OpenBLAS
 
446
  Now build `whisper.cpp` with OpenBLAS support:
447
 
448
  ```
449
+ cmake -B build -DGGML_BLAS=1
450
+ cmake --build build -j --config Release
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
451
  ```
452
 
453
  ## Ascend NPU support
454
 
455
+ Ascend NPU provides inference acceleration via [`CANN`](https://www.hiascend.com/en/software/cann) and AI cores.
456
 
457
  First, check if your Ascend NPU device is supported:
458
 
 
466
  Now build `whisper.cpp` with CANN support:
467
 
468
  ```
469
+ cmake -B build -DGGML_CANN=1
470
+ cmake --build build -j --config Release
 
 
471
  ```
472
 
473
  Run the inference examples as usual, for example:
 
617
  More info is available in [issue #10](https://github.com/ggerganov/whisper.cpp/issues/10).
618
 
619
  ```bash
620
+ cmake -B build
621
+ cmake --build build --config Release
622
+ ./build/bin/stream -m ./models/ggml-base.en.bin -t 8 --step 500 --length 5000
623
  ```
624
 
625
  https://user-images.githubusercontent.com/1991296/194935793-76afede7-cfa8-48d8-a80f-28ba83be7d09.mp4