From 859c14d783dc31fe68550b114fc8adeea09dab2a Mon Sep 17 00:00:00 2001
From: Ariver <shanghai3168@gmail.com>
Date: Sat, 13 Jun 2026 21:48:32 +0800
Subject: [PATCH] Sync macOS paste clipboard safety to X-ASR branch

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

diff --git a/privatevoice.src/internal/engine/engine.go b/privatevoice.src/internal/engine/engine.go
index 6473cb6..3f939c1 100755
--- a/privatevoice.src/internal/engine/engine.go
+++ b/privatevoice.src/internal/engine/engine.go
@@ -20,6 +20,20 @@
 	Close()
 }
 
+// StreamingEngine is implemented by engines that can expose partial results
+// while audio is still being captured.
+type StreamingEngine interface {
+	NewStreamingSession() (StreamingSession, error)
+}
+
+// StreamingSession receives incremental 16kHz mono PCM and returns the current
+// best transcript for the active utterance.
+type StreamingSession interface {
+	Accept(samples []float32) (string, error)
+	Finish() (string, error)
+	Close()
+}
+
 // ModelDir returns the path to the sensevoice model directory.
 func ModelDir() string {
 	resolved, err := resolveCurrentModel()

--
Gitblit v1.9.3