Browse Source

修改讯飞语音识别

newdev_shunjiawei
tanlongsheng 10 months ago
parent
commit
e88f5ee074
  1. 1
      local_plugins/azure_speech/android/src/main/kotlin/com/yunqiinnovation/azure_speech/XunFeiAsrHelper.kt
  2. 1
      local_plugins/azure_speech/ios/azure_speech/Sources/azure_speech/XunFeiAsrHelper.swift

1
local_plugins/azure_speech/android/src/main/kotlin/com/yunqiinnovation/azure_speech/XunFeiAsrHelper.kt

@ -75,7 +75,6 @@ class XunFeiAsrHelper(private val context: Context) {
currentLanguage currentLanguage
} }
callback.onResult(currentSessionId, lastIntermediateResult, detectedLanguage) callback.onResult(currentSessionId, lastIntermediateResult, detectedLanguage)
currentSessionId = ""
} }
callback.onSessionStopped(currentSessionId) callback.onSessionStopped(currentSessionId)
} }

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

@ -106,7 +106,6 @@ class XunFeiAsrHelper: NSObject, URLSessionWebSocketDelegate {
if !currentSessionId.isEmpty && !lastIntermediateResult.isEmpty { if !currentSessionId.isEmpty && !lastIntermediateResult.isEmpty {
let detectedLanguage = detectLanguage(from: lastIntermediateResult) let detectedLanguage = detectLanguage(from: lastIntermediateResult)
callback?.onResult(sessionid: currentSessionId, lastIntermediateResult, detectedLanguage) callback?.onResult(sessionid: currentSessionId, lastIntermediateResult, detectedLanguage)
currentSessionId = ""
} }
callback?.onSessionStopped(sessionid: currentSessionId) callback?.onSessionStopped(sessionid: currentSessionId)
} }

Loading…
Cancel
Save