From 29579831e34251b3a68584a51301c14d3b7e0f1f Mon Sep 17 00:00:00 2001 From: Igor Koshenskii <112656648+chupakobra6@users.noreply.github.com> Date: Mon, 3 Aug 2026 09:12:43 +0300 Subject: [PATCH] examples : fix VAD min silence argument parsing (#3963) Fix --vad-min-silence-duration-ms (-vsd) parsing in whisper-vad-speech-segments. The option was incorrectly assigned to vad_min_speech_duration_ms instead of vad_min_silence_duration_ms. As a result, the requested silence duration was ignored and the minimum speech duration was overwritten. --- examples/vad-speech-segments/speech.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/vad-speech-segments/speech.cpp b/examples/vad-speech-segments/speech.cpp index e929e58e9..469a30c30 100644 --- a/examples/vad-speech-segments/speech.cpp +++ b/examples/vad-speech-segments/speech.cpp @@ -66,7 +66,7 @@ static bool vad_params_parse(int argc, char ** argv, cli_params & params) { else if (arg == "-vm" || arg == "--vad-model") { params.vad_model = ARGV_NEXT; } else if (arg == "-vt" || arg == "--vad-threshold") { params.vad_threshold = std::stof(ARGV_NEXT); } else if (arg == "-vspd" || arg == "--vad-min-speech-duration-ms") { params.vad_min_speech_duration_ms = std::stoi(ARGV_NEXT); } - else if (arg == "-vsd" || arg == "--vad-min-silence-duration-ms") { params.vad_min_speech_duration_ms = std::stoi(ARGV_NEXT); } + else if (arg == "-vsd" || arg == "--vad-min-silence-duration-ms") { params.vad_min_silence_duration_ms = std::stoi(ARGV_NEXT); } else if (arg == "-vmsd" || arg == "--vad-max-speech-duration-s") { params.vad_max_speech_duration_s = std::stof(ARGV_NEXT); } else if (arg == "-vp" || arg == "--vad-speech-pad-ms") { params.vad_speech_pad_ms = std::stoi(ARGV_NEXT); } else if (arg == "-vo" || arg == "--vad-samples-overlap") { params.vad_samples_overlap = std::stof(ARGV_NEXT); }