From 330ad0131cfd368f09f853266cb156fb6f20a98c Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Sun, 3 Nov 2024 01:39:03 -0800 Subject: [PATCH] refac --- src/lib/components/chat/MessageInput/VoiceRecording.svelte | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib/components/chat/MessageInput/VoiceRecording.svelte b/src/lib/components/chat/MessageInput/VoiceRecording.svelte index f39a64d90..8ba0e5bdb 100644 --- a/src/lib/components/chat/MessageInput/VoiceRecording.svelte +++ b/src/lib/components/chat/MessageInput/VoiceRecording.svelte @@ -250,6 +250,11 @@ if (recording && mediaRecorder) { await mediaRecorder.stop(); } + + if (speechRecognition) { + speechRecognition.stop(); + } + stopDurationCounter(); audioChunks = [];