From: Igor Koshenskii Date: Mon, 3 Aug 2026 06:12:43 +0000 (+0300) Subject: examples : fix VAD min silence argument parsing (#3963) X-Git-Tag: upstream/1.9.2~32 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=29579831e34251b3a68584a51301c14d3b7e0f1f;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp 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. --- diff --git a/examples/vad-speech-segments/speech.cpp b/examples/vad-speech-segments/speech.cpp index e929e58e..469a30c3 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); }