From 67ee2b40918a6d01371640d585a176b77f1101a8 Mon Sep 17 00:00:00 2001 From: Emil Lerch Date: Tue, 7 Oct 2025 12:53:32 -0700 Subject: [PATCH] start warning only when buffer starts to fill --- src/stt.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stt.zig b/src/stt.zig index c078699..28facd2 100644 --- a/src/stt.zig +++ b/src/stt.zig @@ -979,7 +979,7 @@ pub const Session = struct { const end_time = std.time.nanoTimestamp(); const processing_ms = @divTrunc(end_time - start_time, std.time.ns_per_ms); const realtime_ms = (samples_read * 1000) / 16000; - if (processing_ms > realtime_ms) + if (processing_ms > realtime_ms and buffer_fill > 20) std.log.warn("Vosk processing behind realtime. {d} samples in {d}ms (realtime: {d}ms), buffer {d}% full", .{ samples_read, processing_ms, realtime_ms, buffer_fill }); // Reset error counters after successful operations