Browse Source

1

newdev_shunjiawei
fdp 1 year ago
parent
commit
36fe506168
  1. 1
      lib/modules/meeting/controllers/meeting_controller.dart
  2. 7
      local_plugins/agent_service/ios/agent_service/Sources/agent_service/AgentServiceImpl.swift
  3. 6
      local_plugins/agent_service/ios/agent_service/Sources/agent_service/AgentServicePlugin.swift

1
lib/modules/meeting/controllers/meeting_controller.dart

@ -319,7 +319,6 @@ class MeetingController extends GetxController {
} else {
FilePickerResult? result = await FilePicker.platform.pickFiles(
withData: true,
type: FileType.audio,
);
if (result != null) {
PlatformFile file = result.files.first;

7
local_plugins/agent_service/ios/agent_service/Sources/agent_service/AgentServiceImpl.swift

@ -290,8 +290,7 @@ class AgentServiceImpl: NSObject {
startIdleCheck()
}
}
func startRecognition(useBle: Bool = false) -> Bool {
func startRecognition(useBle: Bool = false) -> Bool {
if !isInitialized {
sendError("服务未初始化", code: "NOT_INITIALIZED")
return false
@ -326,6 +325,10 @@ class AgentServiceImpl: NSObject {
return true
}
func recognizeCallback(useBle: Bool = false) -> Bool {
return true
}
func stopRecognition() -> Bool {
if !isRecognizing {

6
local_plugins/agent_service/ios/agent_service/Sources/agent_service/AgentServicePlugin.swift

@ -43,6 +43,10 @@ public class AgentServicePlugin: NSObject, FlutterPlugin {
case "startConversation":
impl.startRecognition()
result(true)
case "recognizeCallback":
impl.recognizeCallback()
result(true)
case "stopConversation":
impl.stopRecognition()
@ -157,4 +161,4 @@ extension AgentServiceEventHandler: AgentServiceListener {
}
}
}
}
}

Loading…
Cancel
Save