|
|
@@ -113,18 +113,19 @@ object AsrHelper : OfflineCmdListener {
|
|
|
|
|
|
override fun onPartialResult(taskId: String, text: String) {
|
|
|
// 滚动更新当前识别中间结果
|
|
|
- currentPartial = text
|
|
|
+ currentPartial += text
|
|
|
Log.d(TAG, "ASR partial: $text")
|
|
|
}
|
|
|
|
|
|
override fun onFinalResult(taskId: String, text: String) {
|
|
|
// 将最终结果追加拼接到会话字符串
|
|
|
sessionBuilder.append(text)
|
|
|
- val fullText = sessionBuilder.toString()
|
|
|
isMicRunning = false
|
|
|
- Log.d(TAG, "ASR final result: $fullText")
|
|
|
+ // 滚动更新当前识别中间结果
|
|
|
+ currentPartial += text
|
|
|
+ Log.d(TAG, "ASR final result: $currentPartial")
|
|
|
IntentRecognizeHelper.recognize(
|
|
|
- text = fullText,
|
|
|
+ text = currentPartial,
|
|
|
scence = scene,
|
|
|
onSuccess = { action ->
|
|
|
if (action.name == "goToDecisionCenter") {
|