diff --git a/backend/open_webui/apps/audio/main.py b/backend/open_webui/apps/audio/main.py index 148430da8..b138f82de 100644 --- a/backend/open_webui/apps/audio/main.py +++ b/backend/open_webui/apps/audio/main.py @@ -522,7 +522,8 @@ def transcription( else: data = transcribe(file_path) - return data + file_path = file_path.split("/")[-1] + return {**data, "filename": file_path} except Exception as e: log.exception(e) raise HTTPException( diff --git a/src/lib/components/chat/MessageInput.svelte b/src/lib/components/chat/MessageInput.svelte index 6875dea53..ce48d9dfb 100644 --- a/src/lib/components/chat/MessageInput.svelte +++ b/src/lib/components/chat/MessageInput.svelte @@ -361,8 +361,8 @@ document.getElementById('chat-input')?.focus(); }} on:confirm={async (e) => { - const response = e.detail; - prompt = `${prompt}${response} `; + const { text, filename } = e.detail; + prompt = `${prompt}${text} `; recording = false; diff --git a/src/lib/components/chat/MessageInput/VoiceRecording.svelte b/src/lib/components/chat/MessageInput/VoiceRecording.svelte index a92016879..03b5cec1e 100644 --- a/src/lib/components/chat/MessageInput/VoiceRecording.svelte +++ b/src/lib/components/chat/MessageInput/VoiceRecording.svelte @@ -1,6 +1,6 @@