From 9305251037974c142458b792b1b0cb9c86f517bb Mon Sep 17 00:00:00 2001 From: Daniel Worthington-Bodart Date: Fri, 13 Feb 2026 06:43:25 +0000 Subject: [PATCH] Fix VAD timing log to show per-call and cumulative time The log previously showed cumulative time labeled as just "vad time", which was misleading when called multiple times. Now shows both the per-call time and the cumulative total. Co-Authored-By: Claude Opus 4.6 --- src/whisper.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/whisper.cpp b/src/whisper.cpp index 0729f777..a1bf4b0b 100644 --- a/src/whisper.cpp +++ b/src/whisper.cpp @@ -5189,8 +5189,9 @@ bool whisper_vad_detect_speech( //WHISPER_LOG_DEBUG("chunk %d: p = %7.3f\n", i, probs[i]); } - vctx->t_vad_us += ggml_time_us() - t_start_vad_us; - WHISPER_LOG_INFO("%s: vad time = %.2f ms processing %d samples\n", __func__, 1e-3f * vctx->t_vad_us, n_samples); + const int64_t t_vad_this_us = ggml_time_us() - t_start_vad_us; + vctx->t_vad_us += t_vad_this_us; + WHISPER_LOG_INFO("%s: vad time = %.2f ms (cumulative %.2f ms) processing %d samples\n", __func__, 1e-3f * t_vad_this_us, 1e-3f * vctx->t_vad_us, n_samples); ggml_backend_sched_reset(sched);