From: liangzhenying <867174124@qq.com> Date: Mon, 2 Feb 2026 03:40:02 +0000 (+0800) Subject: 北科AI语音修复偶尔服务器返回识别失败导致对话异常问题 X-Git-Tag: 1.0.4~12 X-Git-Url: http://git.snicker.com.cn/Users/apple/Desktop/static/gitweb.js?a=commitdiff_plain;h=d25d0d4e13dc0293a08f470c7ecc007d17ecc998;p=mirrors%2FShenYin.git 北科AI语音修复偶尔服务器返回识别失败导致对话异常问题 --- diff --git a/ShenYin/ShenYin/Sdk/DcSdk/tool/CCConfig.swift b/ShenYin/ShenYin/Sdk/DcSdk/tool/CCConfig.swift index 85517ba..5c354f1 100644 --- a/ShenYin/ShenYin/Sdk/DcSdk/tool/CCConfig.swift +++ b/ShenYin/ShenYin/Sdk/DcSdk/tool/CCConfig.swift @@ -5,41 +5,41 @@ // Created by liangshi on 2026/1/28. // -//class CCConfig{ -// static var appLanguage = AppSupportLanguage.english -// -// static let wxAppID = "wxd9d677e0024caa90" -// static let wxUniversalLink = "https://dc-cloud-pub.tos-cn-guangzhou.volces.com/app/" -// static let appStoreLink = "https://itunes.apple.com/cn/app/6752551504?mt=8" -// /// 版本检测 -// static let appStoreVersionURL = "https://itunes.apple.com/cn/lookup?id=6752551504" -// -// /// 服务器地址 -// // static let baseURL = "http://118.145.178.188:32000" -// static let baseURL = "https://app-api.deepchords.com" -// //海外版 -// // static let baseURL = "https://app-api.deepchords-ai.com" -// -// /// 用户隐私协议地址 -// static let yonghuBaseURL = "https://pub-tos.deepchords.com" -//} - - - - class CCConfig{ static var appLanguage = AppSupportLanguage.english - - static let wxAppID = "wxeb3291e720293abc" - static let wxUniversalLink = "https://www.playboykq.com/app/" - static let appStoreLink = "https://itunes.apple.com/cn/app/6757697090?mt=8" + + static let wxAppID = "wxd9d677e0024caa90" + static let wxUniversalLink = "https://dc-cloud-pub.tos-cn-guangzhou.volces.com/app/" + static let appStoreLink = "https://itunes.apple.com/cn/app/6752551504?mt=8" /// 版本检测 - static let appStoreVersionURL = "https://itunes.apple.com/cn/lookup?id=6757697090" - + static let appStoreVersionURL = "https://itunes.apple.com/cn/lookup?id=6752551504" + /// 服务器地址 - static let baseURL = "https://app-api.playboykq.com" - + // static let baseURL = "http://118.145.178.188:32000" + static let baseURL = "https://app-api.deepchords.com" + //海外版 + // static let baseURL = "https://app-api.deepchords-ai.com" + /// 用户隐私协议地址 - static let yonghuBaseURL = "https://pub-cdn.playboykq.com" - + static let yonghuBaseURL = "https://pub-tos.deepchords.com" } + + + + +//class CCConfig{ +// static var appLanguage = AppSupportLanguage.english +// +// static let wxAppID = "wxeb3291e720293abc" +// static let wxUniversalLink = "https://www.playboykq.com/app/" +// static let appStoreLink = "https://itunes.apple.com/cn/app/6757697090?mt=8" +// /// 版本检测 +// static let appStoreVersionURL = "https://itunes.apple.com/cn/lookup?id=6757697090" +// +// /// 服务器地址 +// static let baseURL = "https://app-api.playboykq.com" +// +// /// 用户隐私协议地址 +// static let yonghuBaseURL = "https://pub-cdn.playboykq.com" +// +//} diff --git a/ShenYin/ShenYin/Sdk/LogManager.swift b/ShenYin/ShenYin/Sdk/LogManager.swift index f61e054..8735333 100644 --- a/ShenYin/ShenYin/Sdk/LogManager.swift +++ b/ShenYin/ShenYin/Sdk/LogManager.swift @@ -9,7 +9,7 @@ import Foundation /// 日记管理 class Logger { - static var isDebug: Bool = false + static var isDebug: Bool = true fileprivate static let shared = Logger() private var fileHandle:FileHandle? diff --git a/ShenYin/ShenYin/UI/Raisound/RSChatVC.swift b/ShenYin/ShenYin/UI/Raisound/RSChatVC.swift index 20ffd6a..c445d8b 100644 --- a/ShenYin/ShenYin/UI/Raisound/RSChatVC.swift +++ b/ShenYin/ShenYin/UI/Raisound/RSChatVC.swift @@ -85,20 +85,20 @@ class RSChatVC:BaseVC{ RSManager.shared.chat.eventCallBack = {[weak self] event in guard let self = self else {return} if event.event == "started" { - recordMamager.start() + startRecord() } else if event.event == "failed"{ - toolBar.recordBtn.state = .active + startRecord() } else if event.event == "vad.active"{ toolBar.recordBtn.state = .active } else if event.event == "asr.started"{ - toolBar.recordBtn.state = .asr +// toolBar.recordBtn.state = .asr CCAiManager.stopPlay() } else if event.event == "asr.completed"{ - recordMamager.stop() + stopRecord() } else if event.event == "llm.created"{ toolBar.recordBtn.state = .respose @@ -127,8 +127,7 @@ class RSChatVC:BaseVC{ CCAiManager.preparePlayBlueTooth() } else if event.event == "tts.completed"{ - recordMamager.start() - toolBar.recordBtn.state = .active + startRecord() } } RSManager.shared.chat.ttsCallBack = { data in @@ -151,13 +150,19 @@ class RSChatVC:BaseVC{ } App.shared.goToPage(vc) } + func startRecord(){ + toolBar.recordBtn.state = .active + recordMamager.start() + } + func stopRecord(){ + recordMamager.stop() + } } extension RSChatVC:RSRecordBarDelegate{ func recordBarIntterupt(_ toolBar: RSRecordBar) { - recordMamager.start() CCAiManager.stopPlay() - toolBar.recordBtn.state = .active + startRecord() } func recordBarStart(_ toolBar: RSRecordBar) { @@ -165,7 +170,7 @@ extension RSChatVC:RSRecordBarDelegate{ } func recordBarStop(_ toolBar: RSRecordBar) { - recordMamager.stop() + stopRecord() RSManager.shared.chat.cancelSpeedch() CCAiManager.stopPlay() } diff --git "a/document/\347\247\221\345\274\272/Keqiang \347\247\221\345\274\272-General AUL-AUL-PB-LC-24-011-02 \347\233\226\347\253\240(1).pdf" "b/document/\347\247\221\345\274\272/Keqiang \347\247\221\345\274\272-General AUL-AUL-PB-LC-24-011-02 \347\233\226\347\253\240(1).pdf" new file mode 100644 index 0000000..baab9d9 Binary files /dev/null and "b/document/\347\247\221\345\274\272/Keqiang \347\247\221\345\274\272-General AUL-AUL-PB-LC-24-011-02 \347\233\226\347\253\240(1).pdf" differ