diff --git a/lib/modules/login/controllers/facebookLogin.dart b/lib/modules/login/controllers/facebookLogin.dart deleted file mode 100644 index 2ec25147f..000000000 --- a/lib/modules/login/controllers/facebookLogin.dart +++ /dev/null @@ -1,135 +0,0 @@ -import 'dart:convert'; -import 'dart:io'; -import 'dart:math'; - -import 'package:firebase_auth/firebase_auth.dart'; -import 'package:flutter/foundation.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_facebook_auth/flutter_facebook_auth.dart'; -import 'package:get/get.dart'; -import 'package:crypto/crypto.dart'; - -class Facebook { - String? token = ''; - - String name = ''; - String email = ''; - String pictureurl = ''; - String id = ''; - String generateNonce([int length = 32]) { - const charset = - '0123456789ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvwxyz-._'; - final random = Random.secure(); - return List.generate(length, (_) => charset[random.nextInt(charset.length)]) - .join(); - } - - /// Returns the sha256 hash of [input] in hex notation. - String sha256ofString(String input) { - final bytes = utf8.encode(input); - final digest = sha256.convert(bytes); - return digest.toString(); - } - - Future signInWithFacebook() async { - try { - UserCredential userCredential = await loginFacebook(); - //UserCredential userCredential = await loginGoogle(); - token = await userCredential.user?.getIdToken(); - print('facebook响应数据userCredential: $token'); - if (token != "") { - return true; - } else { - return false; - } - } catch (e) { - print(e); - return false; - } - } - - // FaceBook登录 - // 修改后的 signInWithFacebook - Future loginFacebook() async { - //try { - final rawNonce = generateNonce(); - final nonce = sha256ofString(rawNonce); - final LoginResult loginResult = await FacebookAuth.instance - .login( - loginTracking: LoginTracking.limited, // 改为limited,禁用用户跟踪 - nonce: nonce, - ) - .catchError((onError) { - if (kDebugMode) { - //print(onError); - } - throw Exception(onError.message); - }); - if (loginResult.accessToken == null) { - throw Exception(loginResult.message); - } - // Create a credential from the access token - OAuthCredential facebookAuthCredential; - - print("tokenType${loginResult.accessToken!.type}"); - - if (Platform.isIOS) { - // Create a credential from the access token - switch (loginResult.accessToken!.type) { - case AccessTokenType.classic: - final classicToken = loginResult.accessToken as ClassicToken; - // token = classicToken.tokenString; - print('Token 字符串: ${classicToken.tokenString}'); - print('classicToken值: ${classicToken}'); - facebookAuthCredential = FacebookAuthProvider.credential( - classicToken.authenticationToken!, - ); - break; - case AccessTokenType.limited: - final limitedToken = loginResult.accessToken as LimitedToken; - //token = limitedToken.tokenString; - print('Token 字符串: ${limitedToken.tokenString}'); - print('LimitedToken值: ${limitedToken}'); - facebookAuthCredential = OAuthCredential( - providerId: 'facebook.com', - signInMethod: 'oauth', - idToken: limitedToken.tokenString, - rawNonce: rawNonce, - ); - break; - } - } else { - facebookAuthCredential = FacebookAuthProvider.credential( - loginResult.accessToken!.tokenString, - ); - //token = loginResult.accessToken!.tokenString; - } - print('facebookAuthCredential值: ${facebookAuthCredential}'); - if (facebookAuthCredential == null) { - throw Exception("Facebook Login Fail."); - } - final userData = await FacebookAuth.instance.getUserData(); - name = userData["name"].toString(); - - email = userData["email"].toString(); - pictureurl = userData["picture"]["data"]["url"].toString(); - id = userData["id"].toString(); - print("user login facebook ${email}${pictureurl}${name}${id}"); - return FirebaseAuth.instance.signInWithCredential(facebookAuthCredential); - - // final User? user = userCredential.user; // 获取用户信息 - // token = await userCredential.user?.getIdToken(); - // print("irebaseAuth.instance.signInWithCredential ${token}"); - - // return true; - // } catch (e) { - // print("Facebook 登录异常:$e"); - // return false; - // } - } - - // 退出Google登录 - Future signOutFacebook() async { - await FacebookAuth.instance.logOut(); - } -} diff --git a/lib/modules/login/controllers/login_controller.dart b/lib/modules/login/controllers/login_controller.dart index 25fee7448..9f721e94b 100644 --- a/lib/modules/login/controllers/login_controller.dart +++ b/lib/modules/login/controllers/login_controller.dart @@ -10,7 +10,7 @@ import 'package:device_info_plus/device_info_plus.dart'; import 'package:crypto/crypto.dart'; // 用于生成设备指纹 import 'dart:convert'; import '../../../data/services/db/sqflite_api.dart'; -import 'facebookLogin.dart'; + import 'googleLogin.dart'; import 'weixinLogin.dart'; import 'appleLogin.dart'; @@ -477,34 +477,9 @@ class LoginController extends GetxController { }); break; } - case 4: //Facebook登录 + case 4: //Facebook登录(已移除) { - Logger().d("数据获取Facebook"); - final facebook = Facebook(); - bool authResult = await facebook.signInWithFacebook(); - - if (authResult) { - Logger().d("数据获取_Facebook.token${facebook.token}"); - Logger().d("数据获取_Facebook.pictureurl${facebook.pictureurl}"); - Logger().d("数据获取_Facebook.pictureurl${facebook.email}"); - // SettingsController().userName = Facebook().name; - // SettingsController().avatar = Facebook().pictureurl; - // SettingsController().userId = Facebook().id; - //SettingsController().avatar = Google().email; - - // 验证成功,跳转到配对页面 - await requestLogin({ - "mail": facebook.email, - "phone": "", - "stype": loginType, - "vcode": "", - "ttoken": facebook.token, - "phonemodel": "", - "phonemac": _deviceId, - "name": facebook.name, - "avatar": facebook.pictureurl, - }); - } + Logger().d("Facebook登录已移除"); break; } case 3: //Google登录 diff --git a/linux/flutter/generated_plugin_registrant.cc b/linux/flutter/generated_plugin_registrant.cc index 382b3ca70..4738721dc 100644 --- a/linux/flutter/generated_plugin_registrant.cc +++ b/linux/flutter/generated_plugin_registrant.cc @@ -7,7 +7,6 @@ #include "generated_plugin_registrant.h" #include -#include #include #include #include @@ -17,9 +16,6 @@ void fl_register_plugins(FlPluginRegistry* registry) { g_autoptr(FlPluginRegistrar) file_selector_linux_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin"); file_selector_plugin_register_with_registrar(file_selector_linux_registrar); - g_autoptr(FlPluginRegistrar) flutter_secure_storage_linux_registrar = - fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterSecureStorageLinuxPlugin"); - flutter_secure_storage_linux_plugin_register_with_registrar(flutter_secure_storage_linux_registrar); g_autoptr(FlPluginRegistrar) gtk_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "GtkPlugin"); gtk_plugin_register_with_registrar(gtk_registrar); diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake index bd3f71e4d..7da9b9ecc 100644 --- a/linux/flutter/generated_plugins.cmake +++ b/linux/flutter/generated_plugins.cmake @@ -4,7 +4,6 @@ list(APPEND FLUTTER_PLUGIN_LIST file_selector_linux - flutter_secure_storage_linux gtk record_linux url_launcher_linux diff --git a/local_plugins/azure_speech/ios/azure_speech/Package.swift b/local_plugins/azure_speech/ios/azure_speech/Package.swift index b340fbce2..a389be1d8 100644 --- a/local_plugins/azure_speech/ios/azure_speech/Package.swift +++ b/local_plugins/azure_speech/ios/azure_speech/Package.swift @@ -13,7 +13,9 @@ let package = Package( // 添加对ble_service的依赖 .package(path: "../../../ble_service/ios/ble_service"), // 添加对classic_bluetooth的依赖 - .package(path: "../../../classic_bluetooth/ios/classic_bluetooth") + .package(path: "../../../classic_bluetooth/ios/classic_bluetooth"), + // 引入 SwiftProtobuf,用于 AST Protobuf 编解码 + .package(url: "https://github.com/apple/swift-protobuf.git", from: "1.26.0") ], targets: [ .target( @@ -22,7 +24,8 @@ let package = Package( .product(name: "speech", package: "speech"), .product(name: "ble-service", package: "ble_service"), .product(name: "classic-bluetooth", package: "classic_bluetooth"), - "MicrosoftCognitiveServicesSpeech" + "MicrosoftCognitiveServicesSpeech", + .product(name: "SwiftProtobuf", package: "swift-protobuf") ], path: "Sources", // 修改为包含整个 Sources 目录 sources: ["azure_speech/", "tools/","protos_swift/"] // 明确指定包含的子目录 diff --git a/local_plugins/azure_speech/ios/azure_speech/Sources/azure_speech/AzureSpeechPlugin.swift b/local_plugins/azure_speech/ios/azure_speech/Sources/azure_speech/AzureSpeechPlugin.swift index 3c1dd0d29..cae8e7341 100644 --- a/local_plugins/azure_speech/ios/azure_speech/Sources/azure_speech/AzureSpeechPlugin.swift +++ b/local_plugins/azure_speech/ios/azure_speech/Sources/azure_speech/AzureSpeechPlugin.swift @@ -254,9 +254,6 @@ private func sendAudioDataEvent(_ event: [String: Any]) { sendEvent(event, type: .audioData) } -private func sendAstEvent(_ event: [String: Any]) { - sendEvent(event, type: .ast) -} // 设置TTS事件监听器 internal func setupTtsEventListener() { if !isTtsListenerAdded { @@ -1382,9 +1379,9 @@ private class DoubaoCallbackProxy: DoubaoE2ETranslateHelper.Callback { let isRightChannel = (serviceId == "A") if data.count > 0 { if isRightChannel { - BleService.shared.writeExternalRightAudioData(data) + BleService.shared.writeExternalAudioData(data: data) } else { - BleService.shared.writeExternalLeftAudioData(data) + BleService.shared.writeExternalAudioData(data: data) } } } @@ -1483,9 +1480,9 @@ private class AliyunCallbackProxy: AliyunBailianE2EHelper.Callback { let isRightChannel = (serviceId == "A") if data.count > 0 { if isRightChannel { - BleService.shared.writeExternalRightAudioData(data) + BleService.shared.writeExternalAudioData(data: data) } else { - BleService.shared.writeExternalLeftAudioData(data) + BleService.shared.writeExternalAudioData(data: data) } } } diff --git a/local_plugins/azure_speech/ios/azure_speech/Sources/azure_speech/IntegratedSpeechTranslationService.swift b/local_plugins/azure_speech/ios/azure_speech/Sources/azure_speech/IntegratedSpeechTranslationService.swift index 97db886f4..f554fa9cb 100644 --- a/local_plugins/azure_speech/ios/azure_speech/Sources/azure_speech/IntegratedSpeechTranslationService.swift +++ b/local_plugins/azure_speech/ios/azure_speech/Sources/azure_speech/IntegratedSpeechTranslationService.swift @@ -75,6 +75,8 @@ import os.log var sourceLanguage: String = "zh-CN" var targetLanguage: String = "en-US" var currentVoice: String = "en-US-AriaNeural" + var translationSourceLanguage: String = "" + var translationTargetLanguage: String = "" var speechRate: String = "0%" var speechPitch: String = "0%" var speechVolume: String = "100%" @@ -84,11 +86,13 @@ import os.log var translationTimeout: TimeInterval = 10.0 // 新增:控制是否播放合成的音频 var enableAudioPlayback: Bool = false - + public init( sourceLanguage: String = "zh-CN", targetLanguage: String = "en-US", currentVoice: String = "en-US-AriaNeural", + translationSourceLanguage: String = "", + translationTargetLanguage: String = "", speechRate: String = "0%", speechPitch: String = "0%", speechVolume: String = "100%", @@ -101,6 +105,8 @@ import os.log self.sourceLanguage = sourceLanguage self.targetLanguage = targetLanguage self.currentVoice = currentVoice + self.translationSourceLanguage = translationSourceLanguage + self.translationTargetLanguage = translationTargetLanguage self.speechRate = speechRate self.speechPitch = speechPitch self.speechVolume = speechVolume diff --git a/local_plugins/azure_speech/ios/azure_speech/Sources/azure_speech/VolcanoTranslationServiceImpl.swift b/local_plugins/azure_speech/ios/azure_speech/Sources/azure_speech/VolcanoTranslationServiceImpl.swift index 5ad252aac..05f7c9006 100644 --- a/local_plugins/azure_speech/ios/azure_speech/Sources/azure_speech/VolcanoTranslationServiceImpl.swift +++ b/local_plugins/azure_speech/ios/azure_speech/Sources/azure_speech/VolcanoTranslationServiceImpl.swift @@ -564,19 +564,28 @@ public struct TranslationConfiguration { let accessKey: String let secretKey: String let region: String + let subscriptionKey: String + let location: String + let endpoint: String let maxRetryAttempts: Int? let timeout: TimeInterval? - + public init( - accessKey: String, - secretKey: String, + accessKey: String = "", + secretKey: String = "", region: String = "cn-north-1", + subscriptionKey: String = "", + location: String = "", + endpoint: String = "", maxRetryAttempts: Int? = nil, timeout: TimeInterval? = nil ) { self.accessKey = accessKey self.secretKey = secretKey self.region = region + self.subscriptionKey = subscriptionKey + self.location = location + self.endpoint = endpoint self.maxRetryAttempts = maxRetryAttempts self.timeout = timeout } diff --git a/local_plugins/azure_speech/ios/azure_speech/Sources/protos_swift/common/events.pb.swift b/local_plugins/azure_speech/ios/azure_speech/Sources/protos_swift/common/events.pb.swift index c71ff7912..1e7d6e2ef 100644 --- a/local_plugins/azure_speech/ios/azure_speech/Sources/protos_swift/common/events.pb.swift +++ b/local_plugins/azure_speech/ios/azure_speech/Sources/protos_swift/common/events.pb.swift @@ -1,6 +1,5 @@ // DO NOT EDIT. // swift-format-ignore-file -// swiftlint:disable all // // Generated by the Swift generator plugin for the protocol buffer compiler. // Source: common/events.proto @@ -8,6 +7,7 @@ // For information on using the generated types, please see the documentation: // https://github.com/apple/swift-protobuf/ +import Foundation import SwiftProtobuf // If the compiler emits an error on this type, it is because this file @@ -297,5 +297,54 @@ enum Data_Speech_Event_Type: SwiftProtobuf.Enum, Swift.CaseIterable { // MARK: - Code below here is support for the SwiftProtobuf runtime. extension Data_Speech_Event_Type: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0None\0\u{9}StartConnection\0\u{1}StartTask\0\u{9}FinishConnection\0\u{1}FinishTask\0\u{a}0ConnectionStarted\0\u{1}TaskStarted\0\u{9}ConnectionFailed\0\u{1}TaskFailed\0\u{9}ConnectionFinished\0\u{1}TaskFinished\0\u{2}0StartSession\0\u{1}CancelSession\0\u{1}FinishSession\0\u{2}0SessionStarted\0\u{1}SessionCanceled\0\u{1}SessionFinished\0\u{1}SessionFailed\0\u{9}UsageResponse\0\u{1}ChargeData\0\u{2}.TaskRequest\0\u{1}UpdateConfig\0\u{1}ImageRequest\0\u{2}0AudioMuted\0\u{2}2SayHello\0\u{2}2TTSSentenceStart\0\u{1}TTSSentenceEnd\0\u{1}TTSResponse\0\u{2}\u{7}TTSEnded\0\u{1}PodcastRoundStart\0\u{1}PodcastRoundResponse\0\u{1}PodcastRoundEnd\0\u{2}X\u{1}ASRInfo\0\u{1}ASRResponse\0\u{2}\u{8}ASREnded\0\u{2})ChatTTSText\0\u{1}ChatTextQuery\0\u{2}1ChatResponse\0\u{1}ChimeInStart\0\u{1}ChimeInEnd\0\u{2}\u{7}ChatEnded\0\u{1}ThinkStart\0\u{1}ThinkResponse\0\u{1}ThinkEnd\0\u{1}ToolOutput\0\u{1}FCResponseStart\0\u{1}FCResponse\0\u{1}FCResponseEnd\0\u{2}T\u{1}SourceSubtitleStart\0\u{1}SourceSubtitleResponse\0\u{1}SourceSubtitleEnd\0\u{1}TranslationSubtitleStart\0\u{1}TranslationSubtitleResponse\0\u{1}TranslationSubtitleEnd\0") + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "None"), + 1: .aliased(proto: "StartConnection", aliases: ["StartTask"]), + 2: .aliased(proto: "FinishConnection", aliases: ["FinishTask"]), + 50: .aliased(proto: "ConnectionStarted", aliases: ["TaskStarted"]), + 51: .aliased(proto: "ConnectionFailed", aliases: ["TaskFailed"]), + 52: .aliased(proto: "ConnectionFinished", aliases: ["TaskFinished"]), + 100: .same(proto: "StartSession"), + 101: .same(proto: "CancelSession"), + 102: .same(proto: "FinishSession"), + 150: .same(proto: "SessionStarted"), + 151: .same(proto: "SessionCanceled"), + 152: .same(proto: "SessionFinished"), + 153: .same(proto: "SessionFailed"), + 154: .aliased(proto: "UsageResponse", aliases: ["ChargeData"]), + 200: .same(proto: "TaskRequest"), + 201: .same(proto: "UpdateConfig"), + 202: .same(proto: "ImageRequest"), + 250: .same(proto: "AudioMuted"), + 300: .same(proto: "SayHello"), + 350: .same(proto: "TTSSentenceStart"), + 351: .same(proto: "TTSSentenceEnd"), + 352: .same(proto: "TTSResponse"), + 359: .same(proto: "TTSEnded"), + 360: .same(proto: "PodcastRoundStart"), + 361: .same(proto: "PodcastRoundResponse"), + 362: .same(proto: "PodcastRoundEnd"), + 450: .same(proto: "ASRInfo"), + 451: .same(proto: "ASRResponse"), + 459: .same(proto: "ASREnded"), + 500: .same(proto: "ChatTTSText"), + 501: .same(proto: "ChatTextQuery"), + 550: .same(proto: "ChatResponse"), + 551: .same(proto: "ChimeInStart"), + 552: .same(proto: "ChimeInEnd"), + 559: .same(proto: "ChatEnded"), + 560: .same(proto: "ThinkStart"), + 561: .same(proto: "ThinkResponse"), + 562: .same(proto: "ThinkEnd"), + 563: .same(proto: "ToolOutput"), + 564: .same(proto: "FCResponseStart"), + 565: .same(proto: "FCResponse"), + 566: .same(proto: "FCResponseEnd"), + 650: .same(proto: "SourceSubtitleStart"), + 651: .same(proto: "SourceSubtitleResponse"), + 652: .same(proto: "SourceSubtitleEnd"), + 653: .same(proto: "TranslationSubtitleStart"), + 654: .same(proto: "TranslationSubtitleResponse"), + 655: .same(proto: "TranslationSubtitleEnd"), + ] } diff --git a/local_plugins/azure_speech/ios/azure_speech/Sources/protos_swift/common/rpcmeta.pb.swift b/local_plugins/azure_speech/ios/azure_speech/Sources/protos_swift/common/rpcmeta.pb.swift index c0695fcb0..a42671327 100644 --- a/local_plugins/azure_speech/ios/azure_speech/Sources/protos_swift/common/rpcmeta.pb.swift +++ b/local_plugins/azure_speech/ios/azure_speech/Sources/protos_swift/common/rpcmeta.pb.swift @@ -1,6 +1,5 @@ // DO NOT EDIT. // swift-format-ignore-file -// swiftlint:disable all // // Generated by the Swift generator plugin for the protocol buffer compiler. // Source: common/rpcmeta.proto @@ -8,6 +7,7 @@ // For information on using the generated types, please see the documentation: // https://github.com/apple/swift-protobuf/ +import Foundation import SwiftProtobuf // If the compiler emits an error on this type, it is because this file @@ -162,7 +162,15 @@ fileprivate let _protobuf_package = "data.speech.common" extension Data_Speech_Common_RequestMeta: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".RequestMeta" - static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{5}Endpoint\0endpoint\0\u{5}AppKey\0app_key\0\u{5}AppID\0app_id\0\u{5}ResourceID\0resource_id\0\u{5}ConnectionID\0connection_id\0\u{5}SessionID\0session_id\0\u{5}Sequence\0sequence\0") + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .unique(proto: "Endpoint", json: "endpoint"), + 2: .unique(proto: "AppKey", json: "app_key"), + 3: .unique(proto: "AppID", json: "app_id"), + 4: .unique(proto: "ResourceID", json: "resource_id"), + 5: .unique(proto: "ConnectionID", json: "connection_id"), + 6: .unique(proto: "SessionID", json: "session_id"), + 7: .unique(proto: "Sequence", json: "sequence"), + ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -222,7 +230,10 @@ extension Data_Speech_Common_RequestMeta: SwiftProtobuf.Message, SwiftProtobuf._ extension Data_Speech_Common_BillingItem: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".BillingItem" - static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{5}Unit\0unit\0\u{5}Quantity\0quantity\0") + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .unique(proto: "Unit", json: "unit"), + 2: .unique(proto: "Quantity", json: "quantity"), + ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -257,7 +268,11 @@ extension Data_Speech_Common_BillingItem: SwiftProtobuf.Message, SwiftProtobuf._ extension Data_Speech_Common_Billing: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".Billing" - static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{5}Items\0items\0\u{5}DurationMsec\0duration_msec\0\u{5}WordCount\0word_count\0") + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .unique(proto: "Items", json: "items"), + 2: .unique(proto: "DurationMsec", json: "duration_msec"), + 3: .unique(proto: "WordCount", json: "word_count"), + ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -297,7 +312,13 @@ extension Data_Speech_Common_Billing: SwiftProtobuf.Message, SwiftProtobuf._Mess extension Data_Speech_Common_ResponseMeta: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".ResponseMeta" - static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{5}SessionID\0session_id\0\u{5}Sequence\0sequence\0\u{5}StatusCode\0status_code\0\u{5}Message\0message\0\u{5}Billing\0billing\0") + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .unique(proto: "SessionID", json: "session_id"), + 2: .unique(proto: "Sequence", json: "sequence"), + 3: .unique(proto: "StatusCode", json: "status_code"), + 4: .unique(proto: "Message", json: "message"), + 5: .unique(proto: "Billing", json: "billing"), + ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { diff --git a/local_plugins/azure_speech/ios/azure_speech/Sources/protos_swift/products/understanding/ast/ast_service.pb.swift b/local_plugins/azure_speech/ios/azure_speech/Sources/protos_swift/products/understanding/ast/ast_service.pb.swift index 2d3d1297b..f268331e0 100644 --- a/local_plugins/azure_speech/ios/azure_speech/Sources/protos_swift/products/understanding/ast/ast_service.pb.swift +++ b/local_plugins/azure_speech/ios/azure_speech/Sources/protos_swift/products/understanding/ast/ast_service.pb.swift @@ -1,6 +1,5 @@ // DO NOT EDIT. // swift-format-ignore-file -// swiftlint:disable all // // Generated by the Swift generator plugin for the protocol buffer compiler. // Source: products/understanding/ast/ast_service.proto @@ -140,7 +139,7 @@ struct Data_Speech_Ast_TranslateRequest: @unchecked Sendable { fileprivate var _storage = _StorageClass.defaultInstance } -struct Data_Speech_Ast_TranslateResponse: Sendable { +struct Data_Speech_Ast_TranslateResponse: @unchecked Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -183,7 +182,13 @@ fileprivate let _protobuf_package = "data.speech.ast" extension Data_Speech_Ast_ReqParams: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".ReqParams" - static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}mode\0\u{3}source_language\0\u{3}target_language\0\u{3}speaker_id\0\u{2}`\u{1}corpus\0") + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "mode"), + 2: .standard(proto: "source_language"), + 3: .standard(proto: "target_language"), + 4: .standard(proto: "speaker_id"), + 100: .same(proto: "corpus"), + ] fileprivate class _StorageClass { var _mode: String = String() @@ -192,11 +197,15 @@ extension Data_Speech_Ast_ReqParams: SwiftProtobuf.Message, SwiftProtobuf._Messa var _speakerID: String = String() var _corpus: Data_Speech_Understanding_Corpus? = nil + #if swift(>=5.10) // This property is used as the initial default value for new instances of the type. // The type itself is protecting the reference to its storage via CoW semantics. // This will force a copy to be made of this reference when the first mutation occurs; // hence, it is safe to mark this as `nonisolated(unsafe)`. static nonisolated(unsafe) let defaultInstance = _StorageClass() + #else + static let defaultInstance = _StorageClass() + #endif private init() {} @@ -281,7 +290,15 @@ extension Data_Speech_Ast_ReqParams: SwiftProtobuf.Message, SwiftProtobuf._Messa extension Data_Speech_Ast_TranslateRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".TranslateRequest" - static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}request_meta\0\u{1}event\0\u{1}user\0\u{3}source_audio\0\u{3}target_audio\0\u{1}request\0\u{1}denoise\0") + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "request_meta"), + 2: .same(proto: "event"), + 3: .same(proto: "user"), + 4: .standard(proto: "source_audio"), + 5: .standard(proto: "target_audio"), + 6: .same(proto: "request"), + 7: .same(proto: "denoise"), + ] fileprivate class _StorageClass { var _requestMeta: Data_Speech_Common_RequestMeta? = nil @@ -292,11 +309,15 @@ extension Data_Speech_Ast_TranslateRequest: SwiftProtobuf.Message, SwiftProtobuf var _request: Data_Speech_Ast_ReqParams? = nil var _denoise: Bool? = nil + #if swift(>=5.10) // This property is used as the initial default value for new instances of the type. // The type itself is protecting the reference to its storage via CoW semantics. // This will force a copy to be made of this reference when the first mutation occurs; // hence, it is safe to mark this as `nonisolated(unsafe)`. static nonisolated(unsafe) let defaultInstance = _StorageClass() + #else + static let defaultInstance = _StorageClass() + #endif private init() {} @@ -393,7 +414,16 @@ extension Data_Speech_Ast_TranslateRequest: SwiftProtobuf.Message, SwiftProtobuf extension Data_Speech_Ast_TranslateResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".TranslateResponse" - static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}response_meta\0\u{1}event\0\u{1}data\0\u{1}text\0\u{3}start_time\0\u{3}end_time\0\u{3}spk_chg\0\u{3}muted_duration_ms\0") + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "response_meta"), + 2: .same(proto: "event"), + 3: .same(proto: "data"), + 4: .same(proto: "text"), + 5: .standard(proto: "start_time"), + 6: .standard(proto: "end_time"), + 7: .standard(proto: "spk_chg"), + 8: .standard(proto: "muted_duration_ms"), + ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { diff --git a/local_plugins/azure_speech/ios/azure_speech/Sources/protos_swift/products/understanding/base/au_base.pb.swift b/local_plugins/azure_speech/ios/azure_speech/Sources/protos_swift/products/understanding/base/au_base.pb.swift index 09a83ba25..4473184a6 100644 --- a/local_plugins/azure_speech/ios/azure_speech/Sources/protos_swift/products/understanding/base/au_base.pb.swift +++ b/local_plugins/azure_speech/ios/azure_speech/Sources/protos_swift/products/understanding/base/au_base.pb.swift @@ -1,6 +1,5 @@ // DO NOT EDIT. // swift-format-ignore-file -// swiftlint:disable all // // Generated by the Swift generator plugin for the protocol buffer compiler. // Source: products/understanding/base/au_base.proto @@ -359,7 +358,7 @@ struct Data_Speech_Understanding_User: Sendable { init() {} } -struct Data_Speech_Understanding_Audio: Sendable { +struct Data_Speech_Understanding_Audio: @unchecked Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -803,16 +802,46 @@ struct Data_Speech_Understanding_Corpus: Sendable { fileprivate let _protobuf_package = "data.speech.understanding" extension Data_Speech_Understanding_Code: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0ERROR_UNSPECIFIED\0\u{2}\\m\u{2}INVALID_REQUEST\0\u{1}LONG_AUDIO\0\u{1}LARGE_PACKET\0\u{1}INVALID_FORMAT\0\u{1}SILENT_AUDIO\0\u{1}EMPTY_AUDIO\0\u{2}_\u{1}PERMISSION_DENIED\0\u{2}e\u{1}LIMIT_QPS\0\u{1}LIMIT_COUNT\0\u{1}SERVER_BUSY\0\u{2}E\u{3}ERROR_PARAMS\0\u{2}\\T\u{2}SUCCESS\0\u{2}d\u{1}ERROR_PROCESSING\0\u{2}d\u{1}TIMEOUT_WAITING\0\u{1}TIMEOUT_PROCESSING\0\u{2}c\u{1}INTERRUPTED\0\u{2}Q\u{6}AUDIO_DOWNLOAD_FAIL\0\u{2}G@\u{2}ERROR_UNKNOWN\0") + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "ERROR_UNSPECIFIED"), + 11100: .same(proto: "INVALID_REQUEST"), + 11101: .same(proto: "LONG_AUDIO"), + 11102: .same(proto: "LARGE_PACKET"), + 11103: .same(proto: "INVALID_FORMAT"), + 11104: .same(proto: "SILENT_AUDIO"), + 11105: .same(proto: "EMPTY_AUDIO"), + 11200: .same(proto: "PERMISSION_DENIED"), + 11301: .same(proto: "LIMIT_QPS"), + 11302: .same(proto: "LIMIT_COUNT"), + 11303: .same(proto: "SERVER_BUSY"), + 11500: .same(proto: "ERROR_PARAMS"), + 21000: .same(proto: "SUCCESS"), + 21100: .same(proto: "ERROR_PROCESSING"), + 21200: .same(proto: "TIMEOUT_WAITING"), + 21201: .same(proto: "TIMEOUT_PROCESSING"), + 21300: .same(proto: "INTERRUPTED"), + 21701: .same(proto: "AUDIO_DOWNLOAD_FAIL"), + 29900: .same(proto: "ERROR_UNKNOWN"), + ] } extension Data_Speech_Understanding_AsrNotificationCode: SwiftProtobuf._ProtoNameProviding { - static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0NOTIFICATION_UNSPECIFIED\0\u{2}h\u{f}DISCONNECT\0") + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "NOTIFICATION_UNSPECIFIED"), + 1000: .same(proto: "DISCONNECT"), + ] } extension Data_Speech_Understanding_Word: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".Word" - static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}text\0\u{3}start_time\0\u{3}end_time\0\u{3}blank_duration\0\u{1}pronounce\0\u{1}confidence\0") + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "text"), + 2: .standard(proto: "start_time"), + 3: .standard(proto: "end_time"), + 4: .standard(proto: "blank_duration"), + 5: .same(proto: "pronounce"), + 6: .same(proto: "confidence"), + ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -905,7 +934,18 @@ extension Data_Speech_Understanding_ResultAddition: SwiftProtobuf.Message, Swift extension Data_Speech_Understanding_Utterance: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".Utterance" - static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}text\0\u{3}start_time\0\u{3}end_time\0\u{1}definite\0\u{1}words\0\u{1}language\0\u{1}confidence\0\u{1}speaker\0\u{3}channel_id\0\u{2}[\u{1}additions\0") + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "text"), + 2: .standard(proto: "start_time"), + 3: .standard(proto: "end_time"), + 4: .same(proto: "definite"), + 5: .same(proto: "words"), + 6: .same(proto: "language"), + 7: .same(proto: "confidence"), + 8: .same(proto: "speaker"), + 9: .standard(proto: "channel_id"), + 100: .same(proto: "additions"), + ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -984,7 +1024,9 @@ extension Data_Speech_Understanding_Utterance: SwiftProtobuf.Message, SwiftProto extension Data_Speech_Understanding_LanguageDetail: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".LanguageDetail" - static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}prob\0") + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "prob"), + ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -1014,7 +1056,21 @@ extension Data_Speech_Understanding_LanguageDetail: SwiftProtobuf.Message, Swift extension Data_Speech_Understanding_Result: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".Result" - static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}text\0\u{1}utterances\0\u{1}confidence\0\u{3}global_confidence\0\u{1}language\0\u{3}language_details\0\u{1}termination\0\u{1}volume\0\u{3}speech_rate\0\u{3}result_type\0\u{3}ori_text\0\u{1}prefetch\0\u{2}X\u{1}additions\0") + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "text"), + 2: .same(proto: "utterances"), + 3: .same(proto: "confidence"), + 4: .standard(proto: "global_confidence"), + 5: .same(proto: "language"), + 6: .standard(proto: "language_details"), + 7: .same(proto: "termination"), + 8: .same(proto: "volume"), + 9: .standard(proto: "speech_rate"), + 10: .standard(proto: "result_type"), + 11: .standard(proto: "ori_text"), + 12: .same(proto: "prefetch"), + 100: .same(proto: "additions"), + ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -1108,7 +1164,10 @@ extension Data_Speech_Understanding_Result: SwiftProtobuf.Message, SwiftProtobuf extension Data_Speech_Understanding_AudioInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".AudioInfo" - static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}duration\0\u{3}speech_rate\0") + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "duration"), + 2: .standard(proto: "speech_rate"), + ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -1143,7 +1202,9 @@ extension Data_Speech_Understanding_AudioInfo: SwiftProtobuf.Message, SwiftProto extension Data_Speech_Understanding_App: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".App" - static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}work_flow_name\0") + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "work_flow_name"), + ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -1173,7 +1234,13 @@ extension Data_Speech_Understanding_App: SwiftProtobuf.Message, SwiftProtobuf._M extension Data_Speech_Understanding_User: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".User" - static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}uid\0\u{1}did\0\u{1}platform\0\u{3}sdk_version\0\u{3}app_version\0") + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "uid"), + 2: .same(proto: "did"), + 3: .same(proto: "platform"), + 4: .standard(proto: "sdk_version"), + 5: .standard(proto: "app_version"), + ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -1223,7 +1290,22 @@ extension Data_Speech_Understanding_User: SwiftProtobuf.Message, SwiftProtobuf._ extension Data_Speech_Understanding_Audio: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".Audio" - static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}data\0\u{1}url\0\u{3}url_type\0\u{1}format\0\u{1}codec\0\u{1}language\0\u{1}rate\0\u{1}bits\0\u{1}channel\0\u{3}tos_bucket\0\u{3}tos_access_key\0\u{3}audio_tos_object\0\u{3}role_trn\0\u{3}binary_data\0") + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "data"), + 2: .same(proto: "url"), + 3: .standard(proto: "url_type"), + 4: .same(proto: "format"), + 5: .same(proto: "codec"), + 6: .same(proto: "language"), + 7: .same(proto: "rate"), + 8: .same(proto: "bits"), + 9: .same(proto: "channel"), + 10: .standard(proto: "tos_bucket"), + 11: .standard(proto: "tos_access_key"), + 12: .standard(proto: "audio_tos_object"), + 13: .standard(proto: "role_trn"), + 14: .standard(proto: "binary_data"), + ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -1318,7 +1400,10 @@ extension Data_Speech_Understanding_Audio: SwiftProtobuf.Message, SwiftProtobuf. extension Data_Speech_Understanding_AsrNotification: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".AsrNotification" - static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}code\0\u{1}message\0") + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "code"), + 2: .same(proto: "message"), + ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -1353,7 +1438,50 @@ extension Data_Speech_Understanding_AsrNotification: SwiftProtobuf.Message, Swif extension Data_Speech_Understanding_ReqParams: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".ReqParams" - static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}model_name\0\u{3}config_name\0\u{3}enable_vad\0\u{3}enable_punc\0\u{3}enable_itn\0\u{3}enable_ddc\0\u{3}enable_resample\0\u{3}vad_signal\0\u{3}enable_translate\0\u{3}disable_end_punc\0\u{3}enable_speaker_info\0\u{3}enable_channel_split\0\u{3}app_lang\0\u{1}country\0\u{3}audio_type\0\u{3}enable_lid\0\u{3}reco2act_num_spk\0\u{3}reco2max_num_spk\0\u{3}enable_interrupt\0\u{3}vad_segment\0\u{3}enable_ori_text\0\u{3}enable_nonstream\0\u{4}\u{9}show_utterances\0\u{3}show_words\0\u{3}show_duration\0\u{3}show_language\0\u{3}show_volume\0\u{4}\u{2}show_speech_rate\0\u{3}show_prefetch\0\u{3}result_type\0\u{4}\u{16}start_silence_time\0\u{3}end_silence_time\0\u{3}vad_silence_time\0\u{3}min_silence_time\0\u{3}vad_mode\0\u{3}vad_segment_duration\0\u{3}end_window_size\0\u{3}force_to_speech_time\0\u{2} corpus\0\u{1}notification\0\u{3}sensitive_words_filter\0\u{4}D\u{4}show_volume_v\0") + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "model_name"), + 2: .standard(proto: "config_name"), + 3: .standard(proto: "enable_vad"), + 4: .standard(proto: "enable_punc"), + 5: .standard(proto: "enable_itn"), + 6: .standard(proto: "enable_ddc"), + 7: .standard(proto: "enable_resample"), + 8: .standard(proto: "vad_signal"), + 9: .standard(proto: "enable_translate"), + 10: .standard(proto: "disable_end_punc"), + 11: .standard(proto: "enable_speaker_info"), + 12: .standard(proto: "enable_channel_split"), + 13: .standard(proto: "app_lang"), + 14: .same(proto: "country"), + 15: .standard(proto: "audio_type"), + 16: .standard(proto: "enable_lid"), + 17: .standard(proto: "reco2act_num_spk"), + 18: .standard(proto: "reco2max_num_spk"), + 19: .standard(proto: "enable_interrupt"), + 20: .standard(proto: "vad_segment"), + 21: .standard(proto: "enable_ori_text"), + 22: .standard(proto: "enable_nonstream"), + 31: .standard(proto: "show_utterances"), + 32: .standard(proto: "show_words"), + 33: .standard(proto: "show_duration"), + 34: .standard(proto: "show_language"), + 35: .standard(proto: "show_volume"), + 362: .standard(proto: "show_volume_v"), + 37: .standard(proto: "show_speech_rate"), + 38: .standard(proto: "show_prefetch"), + 39: .standard(proto: "result_type"), + 61: .standard(proto: "start_silence_time"), + 62: .standard(proto: "end_silence_time"), + 63: .standard(proto: "vad_silence_time"), + 64: .standard(proto: "min_silence_time"), + 65: .standard(proto: "vad_mode"), + 66: .standard(proto: "vad_segment_duration"), + 67: .standard(proto: "end_window_size"), + 68: .standard(proto: "force_to_speech_time"), + 100: .same(proto: "corpus"), + 101: .same(proto: "notification"), + 102: .standard(proto: "sensitive_words_filter"), + ] fileprivate class _StorageClass { var _modelName: String = String() @@ -1399,11 +1527,15 @@ extension Data_Speech_Understanding_ReqParams: SwiftProtobuf.Message, SwiftProto var _notification: Data_Speech_Understanding_AsrNotification? = nil var _sensitiveWordsFilter: String = String() + #if swift(>=5.10) // This property is used as the initial default value for new instances of the type. // The type itself is protecting the reference to its storage via CoW semantics. // This will force a copy to be made of this reference when the first mutation occurs; // hence, it is safe to mark this as `nonisolated(unsafe)`. static nonisolated(unsafe) let defaultInstance = _StorageClass() + #else + static let defaultInstance = _StorageClass() + #endif private init() {} @@ -1710,7 +1842,21 @@ extension Data_Speech_Understanding_ReqParams: SwiftProtobuf.Message, SwiftProto extension Data_Speech_Understanding_Corpus: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".Corpus" - static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}context\0\u{3}boosting_table_id\0\u{3}boosting_table_name\0\u{3}boosting_id\0\u{3}nnlm_id\0\u{3}correct_table_id\0\u{3}correct_table_name\0\u{3}punc_hot_words\0\u{3}hot_words_list\0\u{3}glossary_list\0\u{4}3show_match_hot_words\0\u{3}show_all_match_hot_words\0\u{3}show_effective_hot_words\0") + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "context"), + 2: .standard(proto: "boosting_table_id"), + 3: .standard(proto: "boosting_table_name"), + 4: .standard(proto: "boosting_id"), + 5: .standard(proto: "nnlm_id"), + 6: .standard(proto: "correct_table_id"), + 7: .standard(proto: "correct_table_name"), + 8: .standard(proto: "punc_hot_words"), + 9: .standard(proto: "hot_words_list"), + 10: .standard(proto: "glossary_list"), + 61: .standard(proto: "show_match_hot_words"), + 62: .standard(proto: "show_all_match_hot_words"), + 63: .standard(proto: "show_effective_hot_words"), + ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { diff --git a/local_plugins/chat_api/ios/chat_api/Sources/chat_api/MCPClient.swift b/local_plugins/chat_api/ios/chat_api/Sources/chat_api/MCPClient.swift index 7df122c15..27506841b 100644 --- a/local_plugins/chat_api/ios/chat_api/Sources/chat_api/MCPClient.swift +++ b/local_plugins/chat_api/ios/chat_api/Sources/chat_api/MCPClient.swift @@ -455,7 +455,7 @@ public class MCPSubClient { } /// 处理连接错误 - private func handleConnectionError(_ error: Error) async { + private func handleConnectionError(_ error: Swift.Error) async { print("[\(serverId)] 连接错误: \(error.localizedDescription)") isConnectedFlag = false keepAliveTask?.cancel() diff --git a/pubspec.yaml b/pubspec.yaml index ebcca5d36..9d7396399 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -71,7 +71,7 @@ dependencies: firebase_core: ^4.0.0 firebase_auth: ^6.0.1 google_sign_in: ^6.2.2 - flutter_facebook_auth: ^7.1.1 + sign_in_with_apple: ^7.0.1 flutter_image_compress: ^2.4.0 common_utils: ^2.1.0 diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index 227ab6e38..2b80ec2fb 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include @@ -30,8 +29,6 @@ void RegisterPlugins(flutter::PluginRegistry* registry) { registry->GetRegistrarForPlugin("FirebaseAuthPluginCApi")); FirebaseCorePluginCApiRegisterWithRegistrar( registry->GetRegistrarForPlugin("FirebaseCorePluginCApi")); - FlutterSecureStorageWindowsPluginRegisterWithRegistrar( - registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin")); FlutterTtsPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("FlutterTtsPlugin")); PermissionHandlerWindowsPluginRegisterWithRegistrar( diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index 17287648d..8e5ed7937 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -8,7 +8,6 @@ list(APPEND FLUTTER_PLUGIN_LIST file_selector_windows firebase_auth firebase_core - flutter_secure_storage_windows flutter_tts permission_handler_windows record_windows