Skip to content

Commit b2513a6

Browse files
authored
vad : remove shortform for --vad option in cli.cpp (#3145)
This commit removes the shortform for the --vad option in cli.cpp. The motivation for this is that `-v` is often used for verbose or version is many tools and this might cause confusion. Refs: #3065 (comment)
1 parent 587ea01 commit b2513a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/cli/cli.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ static bool whisper_params_parse(int argc, char ** argv, whisper_params & params
197197
else if ( arg == "--grammar-rule") { params.grammar_rule = ARGV_NEXT; }
198198
else if ( arg == "--grammar-penalty") { params.grammar_penalty = std::stof(ARGV_NEXT); }
199199
// Voice Activity Detection (VAD)
200-
else if (arg == "-v" || arg == "--vad") { params.vad = true; }
200+
else if ( arg == "--vad") { params.vad = true; }
201201
else if (arg == "-vm" || arg == "--vad-model") { params.vad_model = ARGV_NEXT; }
202202
else if (arg == "-vt" || arg == "--vad-threshold") { params.vad_threshold = std::stof(ARGV_NEXT); }
203203
else if (arg == "-vsd" || arg == "--vad-min-speech-duration-ms") { params.vad_min_speech_duration_ms = std::stoi(ARGV_NEXT); }
@@ -276,7 +276,7 @@ static void whisper_print_usage(int /*argc*/, char ** argv, const whisper_params
276276
fprintf(stderr, " --grammar-penalty N [%-7.1f] scales down logits of nongrammar tokens\n", params.grammar_penalty);
277277
// Voice Activity Detection (VAD) parameters
278278
fprintf(stderr, "\nVoice Activity Detection (VAD) options:\n");
279-
fprintf(stderr, " -v, --vad [%-7s] enable Voice Activity Detection (VAD)\n", params.vad ? "true" : "false");
279+
fprintf(stderr, " --vad [%-7s] enable Voice Activity Detection (VAD)\n", params.vad ? "true" : "false");
280280
fprintf(stderr, " -vm FNAME, --vad-model FNAME [%-7s] VAD model path\n", params.vad_model.c_str());
281281
fprintf(stderr, " -vt N, --vad-threshold N [%-7.2f] VAD threshold for speech recognition\n", params.vad_threshold);
282282
fprintf(stderr, " -vspd N, --vad-min-speech-duration-ms N [%-7d] VAD min speech duration (0.0-1.0)\n", params.vad_min_speech_duration_ms);

0 commit comments

Comments
 (0)