Commit 60fff93b for whisper.cpp
commit 60fff93bce64888a5425466088bf96714aad9108
Author: Jyotishman Das <107503099+rishi02102017@users.noreply.github.com>
Date: Tue Nov 24 13:45:25 2026 +0530
examples : fix stereo to mono averaging with diarization (#4181)
diff --git a/examples/common-whisper.cpp b/examples/common-whisper.cpp
index b12481c0..c275591b 100644
--- a/examples/common-whisper.cpp
+++ b/examples/common-whisper.cpp
@@ -61,7 +61,7 @@ static bool read_audio_from_decoder(ma_decoder & decoder, std::vector<float> & p
std::vector<float> stereo_data = pcmf32;
pcmf32.resize(frame_count);
for (uint64_t i = 0; i < frame_count; i++) {
- pcmf32[i] = (stereo_data[2*i] + stereo_data[2*i + 1]);
+ pcmf32[i] = (stereo_data[2*i] + stereo_data[2*i + 1]) / 2.0f;
}
pcmf32s.resize(2);
pcmf32s[0].resize(frame_count);