From 69ae1cafabd16860271dbb035eed94aeff4f59a6 Mon Sep 17 00:00:00 2001 From: shaohuzhang1 <80892890+shaohuzhang1@users.noreply.github.com> Date: Thu, 3 Apr 2025 09:53:54 +0800 Subject: [PATCH] fix: After the page is redirected, the voice playback does not stop (#2789) --- .../ai-chat/component/operation-button/ChatOperationButton.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/src/components/ai-chat/component/operation-button/ChatOperationButton.vue b/ui/src/components/ai-chat/component/operation-button/ChatOperationButton.vue index 8f6478214..0c69360a2 100644 --- a/ui/src/components/ai-chat/component/operation-button/ChatOperationButton.vue +++ b/ui/src/components/ai-chat/component/operation-button/ChatOperationButton.vue @@ -539,6 +539,9 @@ onBeforeUnmount(() => { if (audioManage.value) { audioManage.value.pause() } + if (window.speechSynthesis) { + window.speechSynthesis.cancel() + } })