diff --git a/src/pages/ChatMain/ChatInputArea/index.vue b/src/pages/ChatMain/ChatInputArea/index.vue index 45a099c..6d8067a 100644 --- a/src/pages/ChatMain/ChatInputArea/index.vue +++ b/src/pages/ChatMain/ChatInputArea/index.vue @@ -4,7 +4,7 @@ @touchend="handleVoiceTouchEndFromContainer" @touchcancel="handleVoiceTouchEndFromContainer" > - + + + + 按住 说话 + + + + 按住 说话 + @@ -80,6 +94,11 @@ + + + + + { watchDogTimer = setTimeout(() => { watchDogTimer = null; console.warn("recording watchdog triggered, forcing UI reset"); - if (hasActiveVoiceRecognition()) { + if (speechProvider === "app" && hasActiveVoiceRecognition()) { stopActiveVoiceRecognition({ shouldSend: true }); return; } @@ -258,7 +284,7 @@ watch(inputMessage, (val) => { // 切换语音/文本模式 const toggleVoiceMode = () => { if (!isSpeechRecognitionSupported.value) return; - if (isVoiceMode.value) { + if (speechProvider === "app" && isVoiceMode.value) { stopActiveVoiceRecognition({ shouldSend: false }); } isVoiceMode.value = !isVoiceMode.value; @@ -395,6 +421,7 @@ const handleVoiceTouchEnd = () => { }; const handleVoiceTouchEndFromContainer = () => { + if (speechProvider !== "app") return; if (!hasActiveVoiceRecognition()) return; stopActiveVoiceRecognition({ shouldSend: true }); };