From 983fe12b4ff3a9b669d1b87eb74d451eeefc2139 Mon Sep 17 00:00:00 2001 From: fdp <1286779656@qq.com> Date: Sun, 28 Sep 2025 15:41:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dtts=E5=A5=94=E6=BA=83?= =?UTF-8?q?=E9=97=AE=E9=A2=989.28?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../azure_speech/Sources/azure_speech/AzureTtsHelper.swift | 2 +- .../ios/azure_speech/Sources/tools/SimpleAudioReceiver.swift | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/local_plugins/azure_speech/ios/azure_speech/Sources/azure_speech/AzureTtsHelper.swift b/local_plugins/azure_speech/ios/azure_speech/Sources/azure_speech/AzureTtsHelper.swift index 32d0df348..9afe14776 100644 --- a/local_plugins/azure_speech/ios/azure_speech/Sources/azure_speech/AzureTtsHelper.swift +++ b/local_plugins/azure_speech/ios/azure_speech/Sources/azure_speech/AzureTtsHelper.swift @@ -291,7 +291,7 @@ public class AzureTtsHelper: NSObject, ITtsService { synthesisQueue.async { do { - self.synthesizer = nil + // self.synthesizer = nil try self.recreateSynthesizer() }catch { os_log("重置语音合成失败: %{public}@", log: self.log, type: .error, error.localizedDescription) diff --git a/local_plugins/azure_speech/ios/azure_speech/Sources/tools/SimpleAudioReceiver.swift b/local_plugins/azure_speech/ios/azure_speech/Sources/tools/SimpleAudioReceiver.swift index 29360a1ed..e5d8b79c6 100644 --- a/local_plugins/azure_speech/ios/azure_speech/Sources/tools/SimpleAudioReceiver.swift +++ b/local_plugins/azure_speech/ios/azure_speech/Sources/tools/SimpleAudioReceiver.swift @@ -264,8 +264,8 @@ public class SimpleAudioReceiver: NSObject { // 非通话:保持原有逻辑,但使用 .allowBluetooth 以支持录音(而不是 A2DP) desiredCategory = .playAndRecord desiredMode = .videoChat - //desiredOptions = [.allowBluetooth, .mixWithOthers, .defaultToSpeaker] - desiredOptions = [.mixWithOthers, .defaultToSpeaker] + desiredOptions = [.allowBluetooth, .mixWithOthers, .defaultToSpeaker] + //desiredOptions = [.mixWithOthers, .defaultToSpeaker] } // 仅在类别或模式变化时才调用 setCategory,避免触发不必要的 categoryChange