Feature npu #10

Merged
iamdoubz merged 16 commits from feature_npu into main 2026-07-02 19:59:19 -05:00
Owner
No description provided.
iamdoubz added 16 commits 2026-07-02 19:59:13 -05:00
whisper.cpp's encoder always runs over a full, padded 30s mel window
(1500 encoder positions) unless audio_ctx is explicitly reduced. The
~4s live-transcription streaming windows were never setting it, so
every window paid the full 30s-equivalent encode cost on one serial
worker thread -- the actual cause of the reported 30-65s lag between
speaking and a segment appearing, not "CPU is just slow".

Scales audio_ctx proportionally to the window's real sample count
instead (audio_ctx_for_window), floored and capped to whisper.cpp's
own valid range. Verified with a controlled A/B against the real
base.en-q5_1 model: ~30% faster even under heavy concurrent CPU
contention on this machine, which is masking most of the improvement
--the fix targets the encoder's O(n^2)-ish attention cost specifically
(1500 -> ~201 positions for a 4s window), so the gain on an otherwise-
idle machine should be substantially larger.
iamdoubz merged commit 89f64e38d3 into main 2026-07-02 19:59:19 -05:00
iamdoubz deleted branch feature_npu 2026-07-02 19:59:19 -05:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: iamdoubz/WhispAssist#10