Skip to content

Commit 2a2bf65

Browse files
committed
cont
1 parent 65731a6 commit 2a2bf65

File tree

6 files changed

+34
-11
lines changed

6 files changed

+34
-11
lines changed

examples/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,3 +129,5 @@ endif()
129129
if (WHISPER_SDL2)
130130
add_subdirectory(wchess)
131131
endif (WHISPER_SDL2)
132+
133+
add_subdirectory(deprecation-warning)

examples/cli/CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,3 @@ include(DefaultTargetOptions)
66
target_link_libraries(${TARGET} PRIVATE common whisper ${FFMPEG_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
77

88
install(TARGETS ${TARGET} RUNTIME)
9-
10-
add_executable(main ../deprecation-warning.cpp)
11-
target_compile_features(main PRIVATE cxx_std_11)

examples/cli/README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ It can be used as a reference for using the `whisper.cpp` library in other proje
66
```
77
./build/bin/whisper-cli -h
88
9-
usage: ./whisper-cli [options] file0.wav file1.wav ...
9+
usage: ./build-pkg/bin/whisper-cli [options] file0.wav file1.wav ...
1010
1111
options:
1212
-h, --help [default] show this help message and exit
@@ -20,9 +20,12 @@ options:
2020
-sow, --split-on-word [false ] split on word rather than on token
2121
-bo N, --best-of N [5 ] number of best candidates to keep
2222
-bs N, --beam-size N [5 ] beam size for beam search
23+
-ac N, --audio-ctx N [0 ] audio context size (0 - all)
2324
-wt N, --word-thold N [0.01 ] word timestamp probability threshold
2425
-et N, --entropy-thold N [2.40 ] entropy threshold for decoder fail
2526
-lpt N, --logprob-thold N [-1.00 ] log probability threshold for decoder fail
27+
-tp, --temperature N [0.00 ] The sampling temperature, between 0 and 1
28+
-tpi, --temperature-inc N [0.20 ] The increment of temperature, between 0 and 1
2629
-debug, --debug-mode [false ] enable debug mode (eg. dump log_mel)
2730
-tr, --translate [false ] translate from source language to english
2831
-di, --diarize [false ] stereo audio diarization
@@ -38,16 +41,23 @@ options:
3841
-oj, --output-json [false ] output result in a JSON file
3942
-ojf, --output-json-full [false ] include more information in the JSON file
4043
-of FNAME, --output-file FNAME [ ] output file path (without file extension)
44+
-np, --no-prints [false ] do not print anything other than the results
4145
-ps, --print-special [false ] print special tokens
4246
-pc, --print-colors [false ] print colors
4347
-pp, --print-progress [false ] print progress
4448
-nt, --no-timestamps [false ] do not print timestamps
4549
-l LANG, --language LANG [en ] spoken language ('auto' for auto-detect)
4650
-dl, --detect-language [false ] exit after automatically detecting language
47-
--prompt PROMPT [ ] initial prompt
51+
--prompt PROMPT [ ] initial prompt (max n_text_ctx/2 tokens)
4852
-m FNAME, --model FNAME [models/ggml-base.en.bin] model path
4953
-f FNAME, --file FNAME [ ] input WAV file path
5054
-oved D, --ov-e-device DNAME [CPU ] the OpenVINO device used for encode inference
55+
-dtw MODEL --dtw MODEL [ ] compute token-level timestamps
5156
-ls, --log-score [false ] log best decoder scores of tokens
5257
-ng, --no-gpu [false ] disable GPU
58+
-fa, --flash-attn [false ] flash attention
59+
--suppress-regex REGEX [ ] regular expression matching tokens to suppress
60+
--grammar GRAMMAR [ ] GBNF grammar to guide decoding
61+
--grammar-rule RULE [ ] top-level GBNF grammar rule name
62+
--grammar-penalty N [100.0 ] scales down logits of nongrammar tokens
5363
```
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
add_executable(main ./deprecation-warning.cpp)
2+
target_compile_features(main PRIVATE cxx_std_11)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Migration notice for binary filenames
2+
3+
> [!IMPORTANT]
4+
[2024 Dec 20] Binaries have been renamed w/ a `whisper-` prefix. `main` is now `whisper-cli`, `server` is `whisper-server`, etc (https://github.com/ggerganov/whisper.cpp/pull/2648)
5+
6+
This migration was important, but it is a breaking change that may not always be immediately obvious to users.
7+
8+
Please update all scripts and workflows to use the new binary names.
9+
10+
| Old Filename | New Filename |
11+
| ---- | ---- |
12+
| main | whisper-cli |
13+
| server | whisper-server |

examples/deprecation-warning/deprecation-warning.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
#include <cstdio>
44
#include <string>
5-
#include <unordered_map>
65

76
// Main
87
int main(int argc, char** argv) {
@@ -17,18 +16,18 @@ int main(int argc, char** argv) {
1716
filename = filename.substr(pos+1);
1817
}
1918

20-
// Append "llama-" to the beginning of filename to get the replacemnt filename
21-
auto replacement_filename = "llama-" + filename;
19+
// Append "whisper-" to the beginning of filename to get the replacemnt filename
20+
auto replacement_filename = "whisper-" + filename;
2221

23-
// The exception is if the filename is "main", then our replacement filename is "llama-cli"
22+
// The exception is if the filename is "main", then our replacement filename is "whisper-cli"
2423
if (filename == "main") {
25-
replacement_filename = "llama-cli";
24+
replacement_filename = "whisper-cli";
2625
}
2726

2827
fprintf(stdout, "\n");
2928
fprintf(stdout, "WARNING: The binary '%s' is deprecated.\n", filename.c_str());
3029
fprintf(stdout, " Please use '%s' instead.\n", replacement_filename.c_str());
31-
fprintf(stdout, " See https://github.com/ggerganov/llama.cpp/tree/master/examples/deprecation-warning/README.md for more information.\n");
30+
fprintf(stdout, " See https://github.com/ggerganov/whisper.cpp/tree/master/examples/deprecation-warning/README.md for more information.\n");
3231
fprintf(stdout, "\n");
3332

3433
return EXIT_FAILURE;

0 commit comments

Comments
 (0)