From e86df221fa8f9d6796fb7fe59020767d7c806fac Mon Sep 17 00:00:00 2001
From: Ariver <shanghai3168@gmail.com>
Date: Sun, 14 Jun 2026 20:57:40 +0800
Subject: [PATCH] Fix X-ASR hold pre-capture

---
 privatevoice.src/internal/engine/engine.go |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/privatevoice.src/internal/engine/engine.go b/privatevoice.src/internal/engine/engine.go
index c3e564d..e2b918d 100755
--- a/privatevoice.src/internal/engine/engine.go
+++ b/privatevoice.src/internal/engine/engine.go
@@ -33,6 +33,13 @@
 	ReleaseTailCaptureDelay() time.Duration
 }
 
+// HoldPreCaptureEngine is implemented by engines that should start capturing
+// audio immediately on hold-to-talk key down, before the activation delay has
+// confirmed that the hotkey was not part of a key combination.
+type HoldPreCaptureEngine interface {
+	HoldPreCaptureEnabled() bool
+}
+
 // StreamingSession receives incremental 16kHz mono PCM and returns the current
 // best transcript for the active utterance.
 type StreamingSession interface {

--
Gitblit v1.9.3