fix(asr): 修复语音识别过程中停止麦克风的问题
- 在最终识别结果处理时添加了停止ASR和麦克风的方法调用 - 防止语音识别结束后麦克风持续运行导致的资源占用问题 - 确保语音识别流程正确关闭,避免后续识别冲突
这个提交包含在:
父节点
5ec788910d
当前提交
63430c9964
@ -130,6 +130,7 @@ object AsrHelper : OfflineCmdListener {
|
|||||||
isMicRunning = false
|
isMicRunning = false
|
||||||
// 滚动更新当前识别中间结果
|
// 滚动更新当前识别中间结果
|
||||||
currentPartial += text
|
currentPartial += text
|
||||||
|
asr?.stopAsrWithMic()
|
||||||
Log.d(TAG, "ASR final result: $currentPartial")
|
Log.d(TAG, "ASR final result: $currentPartial")
|
||||||
IntentRecognizeHelper.recognize(
|
IntentRecognizeHelper.recognize(
|
||||||
text = currentPartial,
|
text = currentPartial,
|
||||||
|
|||||||
正在加载...
在新工单中引用
屏蔽一个用户