From 12a36a5fe7bd0f62d6eb55f3496d6f8d7c214f3f Mon Sep 17 00:00:00 2001 From: fdp <1286779656@qq.com> Date: Fri, 19 Sep 2025 16:30:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E7=94=B5=E8=AF=9D=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E5=8E=BB=E5=A4=84=E5=98=9F=E5=98=9F=E5=98=9F=E5=A3=B0=E9=9F=B3?= =?UTF-8?q?=EF=BC=8C=E5=BD=B1=E5=93=8D=E5=9B=9E=E9=9F=B3=E6=B6=88=E9=99=A4?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sources/agent_service/AgentServiceImpl.swift | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/local_plugins/agent_service/ios/agent_service/Sources/agent_service/AgentServiceImpl.swift b/local_plugins/agent_service/ios/agent_service/Sources/agent_service/AgentServiceImpl.swift index b294b6a05..e51d45a41 100644 --- a/local_plugins/agent_service/ios/agent_service/Sources/agent_service/AgentServiceImpl.swift +++ b/local_plugins/agent_service/ios/agent_service/Sources/agent_service/AgentServiceImpl.swift @@ -81,7 +81,7 @@ class AgentServiceImpl: NSObject { private let maxIdleSeconds: TimeInterval = 10 var micCapture: MicrophoneCapture! // 语音识别模式 - private var currentRecognitionMode: String = "normal" + public var currentRecognitionMode: String = "normal" internal var audioPlayer: AudioPlayer? // private var locationInfo:[String: String]? @@ -1581,9 +1581,14 @@ class AudioPlayer { } func playAwaitSound() { - // 先停止之前的等待音效和定时器 + //先停止之前的等待音效和定时器 stopAwaitSound() + // 修复:通过 agentService 引用访问 currentRecognitionMode + if agentService?.currentRecognitionMode == "phone_call" {//电话模式不要嘟嘟嘟。影响回音消除功能 + return + } + // 播放等待音效 playLoopSound(named: "await", fileType: "mp3", player: &awaitPlayer,volume:0.2)