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 { } else {
FilePickerResult? result = await FilePicker.platform.pickFiles( FilePickerResult? result = await FilePicker.platform.pickFiles(
withData: true, withData: true,
type: FileType.audio,
); );
if (result != null) { if (result != null) {
PlatformFile file = result.files.first; 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() startIdleCheck()
} }
} }
func startRecognition(useBle: Bool = false) -> Bool {
func startRecognition(useBle: Bool = false) -> Bool {
if !isInitialized { if !isInitialized {
sendError("服务未初始化", code: "NOT_INITIALIZED") sendError("服务未初始化", code: "NOT_INITIALIZED")
return false return false
@ -326,6 +325,10 @@ class AgentServiceImpl: NSObject {
return true return true
} }
func recognizeCallback(useBle: Bool = false) -> Bool {
return true
}
func stopRecognition() -> Bool { func stopRecognition() -> Bool {
if !isRecognizing { 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": case "startConversation":
impl.startRecognition() impl.startRecognition()
result(true) result(true)
case "recognizeCallback":
impl.recognizeCallback()
result(true)
case "stopConversation": case "stopConversation":
impl.stopRecognition() impl.stopRecognition()
@ -157,4 +161,4 @@ extension AgentServiceEventHandler: AgentServiceListener {
} }
} }
} }
} }

Loading…
Cancel
Save