From 503019b28d41979ae2007a607deb22ce3012356e Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Sun, 3 Nov 2024 01:21:58 -0800 Subject: [PATCH] fix: web stt issue --- src/lib/components/chat/MessageInput/VoiceRecording.svelte | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib/components/chat/MessageInput/VoiceRecording.svelte b/src/lib/components/chat/MessageInput/VoiceRecording.svelte index 03b5cec1e..10f34a5ec 100644 --- a/src/lib/components/chat/MessageInput/VoiceRecording.svelte +++ b/src/lib/components/chat/MessageInput/VoiceRecording.svelte @@ -171,7 +171,7 @@ mediaRecorder.ondataavailable = (event) => audioChunks.push(event.data); mediaRecorder.onstop = async () => { console.log('Recording stopped'); - if (($settings?.audio?.stt?.engine ?? '') === 'web') { + if ($config.audio.stt.engine === 'web' || ($settings?.audio?.stt?.engine ?? '') === 'web') { audioChunks = []; } else { if (confirmed) { @@ -229,8 +229,7 @@ console.log('recognition ended'); confirmRecording(); - dispatch('confirm', transcription); - + dispatch('confirm', { text: transcription }); confirmed = false; loading = false; };