From 0e9b1d504764455c7e05738978c188d8f2956ed6 Mon Sep 17 00:00:00 2001 From: zhangyahui Date: Fri, 31 Oct 2025 16:56:56 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=B8=8D=E6=94=AF=E6=8C=81=E8=AF=AD?= =?UTF-8?q?=E9=9F=B3=E8=AF=86=E5=88=AB=E6=97=B6=E4=BF=AE=E6=94=B9isRecordi?= =?UTF-8?q?ng=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/asistant/components/InputArea.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/views/asistant/components/InputArea.vue b/src/views/asistant/components/InputArea.vue index a9ea235..78b75a4 100644 --- a/src/views/asistant/components/InputArea.vue +++ b/src/views/asistant/components/InputArea.vue @@ -196,7 +196,9 @@ const startRecording = () => { if (!speechRecognition) { // 检查浏览器支持 if (!('webkitSpeechRecognition' in window) && !('SpeechRecognition' in window)) { - alert('您的浏览器不支持语音识别功能') + // alert('您的浏览器不支持语音识别功能') + showToast('Your browser does not support speech recognition, please try again with another browser') + isRecording.value = false return } @@ -244,7 +246,7 @@ const startRecording = () => { // 显示临时结果(可选) if (interimTranscript) { - console.log('临时识别结果:', interimTranscript) + console.log('语音转文字识别中:', interimTranscript) } } @@ -261,6 +263,7 @@ const startRecording = () => { console.error('语音识别错误:', event.error) isRecording.value = false // alert('语音识别失败,请重试') + showToast('Speech recognition failed, please try again') showToast(event.error) }