From 8c9ba89a748d4c99810b31f3b455d1ed43d9b61f Mon Sep 17 00:00:00 2001
From: Ariver <shanghai3168@gmail.com>
Date: Thu, 02 Jul 2026 01:44:59 +0800
Subject: [PATCH] Prepare 2.1.40 multi-platform package build

---
 privatevoice.src/services/engine_service.go |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/privatevoice.src/services/engine_service.go b/privatevoice.src/services/engine_service.go
index f7608d5..ecfb3ac 100755
--- a/privatevoice.src/services/engine_service.go
+++ b/privatevoice.src/services/engine_service.go
@@ -373,8 +373,14 @@
 	if err != nil {
 		return model.ModelProfile{}, err
 	}
-	if !model.IsModelSupportedInCurrentBuild(profile.ID) {
+	switch model.ModelUnsupportedReason(profile.ID) {
+	case "":
+	case model.UnsupportedReasonRequiresMacOS14:
 		return model.ModelProfile{}, fmt.Errorf("model %s requires macOS 14 or later", profile.ID)
+	case model.UnsupportedReasonWindowsPreview:
+		return model.ModelProfile{}, fmt.Errorf("model %s is not supported in the Windows preview build; use SenseVoice", profile.ID)
+	default:
+		return model.ModelProfile{}, fmt.Errorf("model %s is not supported in this build", profile.ID)
 	}
 
 	current := s.currentModel()

--
Gitblit v1.9.3