Browse Source

修改讯飞语音识别

newdev_shunjiawei
tanlongsheng 10 months ago
parent
commit
a4139cc524
  1. 6
      local_plugins/azure_speech/ios/azure_speech/Sources/azure_speech/XunFeiAsrHelper.swift

6
local_plugins/azure_speech/ios/azure_speech/Sources/azure_speech/XunFeiAsrHelper.swift

@ -195,13 +195,9 @@ class XunFeiAsrHelper: NSObject, URLSessionWebSocketDelegate {
if typeInt == 0 {
callback?.onResult(sessionid: currentSessionId, resultTextTemp, detectedLanguage)
currentSessionId = ""
currentSessionId = UUID().uuidString
lastIntermediateResult = ""
} else {
if currentSessionId.isEmpty {
currentSessionId = UUID().uuidString
callback?.onSessionStarted(sessionid: currentSessionId)
}
lastIntermediateResult = resultTextTemp
callback?.onRecognizing(sessionid: currentSessionId, resultTextTemp, detectedLanguage)
}

Loading…
Cancel
Save