From fecea2c7a4ecc48b2354868894e78be361a2ccf1 Mon Sep 17 00:00:00 2001
From: Cw <cw@git.boborobots.com>
Date: Sat, 04 Jul 2026 16:53:53 +0800
Subject: [PATCH] Fix Windows ASR model paths for non-ASCII users

---
 C1.source/privatevoice.src/internal/audio/recorder_test.go |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/C1.source/privatevoice.src/internal/audio/recorder_test.go b/C1.source/privatevoice.src/internal/audio/recorder_test.go
index 79d10cc..092b043 100644
--- a/C1.source/privatevoice.src/internal/audio/recorder_test.go
+++ b/C1.source/privatevoice.src/internal/audio/recorder_test.go
@@ -36,6 +36,27 @@
 	}
 }
 
+func TestOnDataCapsRecordingBuffer(t *testing.T) {
+	r := &Recorder{
+		isRecording: true,
+		pcmBuf:      make([]byte, maxPCMBufferBytes-2),
+	}
+
+	r.onData(pcm16LE(1, 2))
+
+	if got := len(r.pcmBuf); got != maxPCMBufferBytes {
+		t.Fatalf("pcm buffer length = %d, want capped %d", got, maxPCMBufferBytes)
+	}
+	if !r.bufferLimitHit {
+		t.Fatal("bufferLimitHit should be set after truncating at cap")
+	}
+
+	r.onData(pcm16LE(3))
+	if got := len(r.pcmBuf); got != maxPCMBufferBytes {
+		t.Fatalf("pcm buffer length after cap = %d, want %d", got, maxPCMBufferBytes)
+	}
+}
+
 func pcm16LE(values ...int16) []byte {
 	buf := make([]byte, len(values)*2)
 	for i, value := range values {

--
Gitblit v1.9.3