fujimotos commited on
Commit
aa64fa0
·
unverified ·
1 Parent(s): db55b1e

docs : document how to use 'WHISPER_FFMPEG' build option (#3029)

Browse files

FFmpeg integration was introduced in 1b51fdf by William Tambellini,
but not mentioned in the main documentation.

Add a short guide on how to enable the feature. Confirmed to work
on both Ubuntu 24.04 and Fedora 39.

Signed-off-by: Fujimoto Seiji <[email protected]>

Files changed (1) hide show
  1. README.md +31 -0
README.md CHANGED
@@ -375,6 +375,37 @@ Run the inference examples as usual, for example:
375
  - If you have trouble with Ascend NPU device, please create a issue with **[CANN]** prefix/tag.
376
  - If you run successfully with your Ascend NPU device, please help update the table `Verified devices`.
377
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
378
  ## Docker
379
 
380
  ### Prerequisites
 
375
  - If you have trouble with Ascend NPU device, please create a issue with **[CANN]** prefix/tag.
376
  - If you run successfully with your Ascend NPU device, please help update the table `Verified devices`.
377
 
378
+ ## FFmpeg support (Linux only)
379
+
380
+ If you want to support more audio formats (such as Opus and AAC), you can turn on the `WHISPER_FFMPEG` build flag to enable FFmpeg integration.
381
+
382
+ First, you need to install required libraries:
383
+
384
+ ```bash
385
+ # Debian/Ubuntu
386
+ sudo apt install libavcodec-dev libavformat-dev libavutil-dev
387
+
388
+ # RHEL/Fedora
389
+ sudo dnf install libavcodec-free-devel libavformat-free-devel libavutil-free-devel
390
+ ```
391
+
392
+ Then you can build the project as follows:
393
+
394
+ ```bash
395
+ cmake -B build -D WHISPER_FFMPEG=yes
396
+ cmake --build build
397
+ ```
398
+
399
+ Run the following example to confirm it's working:
400
+
401
+ ```bash
402
+ # Convert an audio file to Opus format
403
+ ffmpeg -i samples/jfk.wav jfk.opus
404
+
405
+ # Transcribe the audio file
406
+ ./build/bin/whisper-cli --model models/ggml-base.en.bin --file jfk.opus
407
+ ```
408
+
409
  ## Docker
410
 
411
  ### Prerequisites