|
|
@ -279,6 +279,8 @@ class AgentServiceImpl: NSObject { |
|
|
self.xunfeiAccessKeySecret = xunfeiAccessKeySecret |
|
|
self.xunfeiAccessKeySecret = xunfeiAccessKeySecret |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//启动定位服务 |
|
|
//启动定位服务 |
|
|
NotificationCenter.default.post(name: .locationstartEvent, object: nil) |
|
|
NotificationCenter.default.post(name: .locationstartEvent, object: nil) |
|
|
// addlocationmonitor() |
|
|
// addlocationmonitor() |
|
|
@ -311,9 +313,8 @@ class AgentServiceImpl: NSObject { |
|
|
LocationService.shared.getCurrentLocation() { location in |
|
|
LocationService.shared.getCurrentLocation() { location in |
|
|
// self.locationInfo = location |
|
|
// self.locationInfo = location |
|
|
} |
|
|
} |
|
|
|
|
|
currentRecognitionMode = "normal" |
|
|
checkAdnSetAudioSession() |
|
|
checkAdnSetAudioSession() |
|
|
|
|
|
|
|
|
return isInitialized |
|
|
return isInitialized |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -390,6 +391,7 @@ class AgentServiceImpl: NSObject { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private func checkAdnSetAudioSession() { |
|
|
private func checkAdnSetAudioSession() { |
|
|
|
|
|
os_log("liwei------ 检查并设置音频会话", log: logger, type: .info) |
|
|
let audioSourceType: AzureAsrHelper.AudioSourceType = BleService.shared.isConnected() ? .external : .microphone |
|
|
let audioSourceType: AzureAsrHelper.AudioSourceType = BleService.shared.isConnected() ? .external : .microphone |
|
|
azureAsrHelper?.performAudioStart(mod: currentRecognitionMode, audioSourceType: audioSourceType, audioDataCallback: nil) |
|
|
azureAsrHelper?.performAudioStart(mod: currentRecognitionMode, audioSourceType: audioSourceType, audioDataCallback: nil) |
|
|
} |
|
|
} |
|
|
|