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; };