Skip to content

Commit 6b346d8

Browse files
committed
Make paths changable
1 parent d27ef03 commit 6b346d8

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

examples/cli/cli.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,8 @@ static void whisper_print_usage(int /*argc*/, char ** argv, const whisper_params
273273
fprintf(stderr, " -f FNAME, --file FNAME [%-7s] input audio file path\n", "");
274274
fprintf(stderr, " -oved D, --ov-e-device DNAME [%-7s] the OpenVINO device used for encode inference\n", params.openvino_encode_device.c_str());
275275
fprintf(stderr, " -dov DN, --ov-directory DN [%-7s] the OpenVINO directory path\n", params.openvino_directory.c_str());
276-
fprintf(stderr, " -nlml, --disable-coreml Disable CoreML\n", params.disable_coreml ? "true" : "false");
276+
fprintf(stderr, " -nlml, --disable-coreml [%-7s] Disable CoreML\n", params.disable_coreml ? "true" : "false");
277+
fprintf(stderr, " -nlml, --disable-coreml [%-7s] Disable CoreML\n", params.disable_coreml ? "true" : "false");
277278
fprintf(stderr, " -dtw MODEL --dtw MODEL [%-7s] compute token-level timestamps\n", params.dtw.c_str());
278279
fprintf(stderr, " -ls, --log-score [%-7s] log best decoder scores of tokens\n", params.log_score?"true":"false");
279280
fprintf(stderr, " -ng, --no-gpu [%-7s] disable GPU\n", params.use_gpu ? "false" : "true");

src/whisper.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@
3737
#include <vector>
3838
#include <sys/stat.h> // For data_file_exists
3939

40-
#define NDEBUG
41-
4240
#if defined(WHISPER_BIG_ENDIAN)
4341
template<typename T>
4442
static T byteswap(T value) {
@@ -3358,9 +3356,7 @@ static std::string replace_extra_data_directory(std::string path_bin, std::strin
33583356

33593357
// Check replacement_path actually exists
33603358
if(must_exist && !data_file_exists(new_path.c_str())) {
3361-
#ifdef NDEBUG
33623359
fprintf(stderr, "Trying to replace with non-existant path %s returning passed path %s\n", replacement_path.c_str(), path_bin.c_str());
3363-
#endif
33643360
return path_bin;
33653361
}
33663362

@@ -3385,9 +3381,7 @@ static std::string replace_extra_data_directory(std::string path_bin, std::strin
33853381
new_path = new_path + file_part;
33863382

33873383
if(must_exist && !data_file_exists(new_path.c_str())) {
3388-
#ifdef NDEBUG
33893384
fprintf(stderr, "Error replacing path %s returning passed path %s\n", replacement_path.c_str(), path_bin.c_str());
3390-
#endif
33913385
return path_bin;
33923386
}
33933387

0 commit comments

Comments
 (0)