diff --git a/hook/useRealtimeRecorderOnce.js b/hook/useRealtimeRecorderOnce.js index c2ce28d..b297920 100644 --- a/hook/useRealtimeRecorderOnce.js +++ b/hook/useRealtimeRecorderOnce.js @@ -546,7 +546,6 @@ export function useRealtimeRecorderOnce() { // 发送到服务器进行识别 await sendToASR(audioBlob); - isProcessing.value = false } else { throw new Error('录音数据为空或无效'); } @@ -604,6 +603,7 @@ export function useRealtimeRecorderOnce() { if (response.ok) { const result = await response.json(); if(result.code == 200){ + isProcessing.value = false recognizedText.value = result.data || '' }else{ $api.msg(result.msg || '识别失败')