[GH-ISSUE #17636] issue: Transcription doesn't work without file content type #89088

Closed
opened 2026-05-15 13:57:13 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @pinage404 on GitHub (Sep 22, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/17636

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I am using the latest version of Open WebUI.

Installation Method

I use Nix

Open WebUI Version

v0.6.28 (this is not the latest but it seems that there is no changes on this part)

Ollama Version (if applicable)

No response

Operating System

NixOS, 25.05 (Warbler), 25.05.20250918.d2ed996

Browser (if applicable)

No response

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

Hello

I'm trying to use VoxInput with Open WebUI

VoxInput is a tool that transcribes input from your microphone and turns it into key presses on a virtual keyboard

When i try to use VoxInput with Open WebUI, i get these logs

sept. 22 02:02:09 framework-16 open-webui[439306]: 2025-09-22 02:02:09.919 | INFO     | open_webui.routers.audio:transcription:944 - file.content_type: None

/* really long log */

sept. 22 02:02:09 framework-16 open-webui[439306]:   File "/nix/store/p5brdf6qg9wn34z4gl55bm0anr0izahi-open-webui-0.6.28/lib/python3.13/site-packages/open_webui/routers/audio.py", line 951, in <genexpr>
sept. 22 02:02:09 framework-16 open-webui[439306]:     fnmatch(file.content_type, content_type)
sept. 22 02:02:09 framework-16 open-webui[439306]:     ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sept. 22 02:02:09 framework-16 open-webui[439306]:   File "/nix/store/829wb290i87wngxlh404klwxql5v18p4-python3-3.13.7/lib/python3.13/fnmatch.py", line 34, in fnmatch
sept. 22 02:02:09 framework-16 open-webui[439306]:     name = os.path.normcase(name)
sept. 22 02:02:09 framework-16 open-webui[439306]:   File "<frozen posixpath>", line 55, in normcase
sept. 22 02:02:09 framework-16 open-webui[439306]: TypeError: expected str, bytes or os.PathLike object, not NoneType

The first log seems to come from this line

6bc5d331a2/backend/open_webui/routers/audio.py (L944)

The error seems to come from this one

6bc5d331a2/backend/open_webui/routers/audio.py (L951)

VoxInput uses go-openai to make their requests to an OpenAI compatible API

flowchart LR
  VoxInput --> go-openai --> OpenWebUI["Open WebUI"]

go-openai doesn't send content type of the uploaded file

OpenAI's documentation shows an example with cURL

curl https://api.openai.com/v1/audio/transcriptions \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "Content-Type: multipart/form-data" \
  -F file="@/path/to/file/audio.mp3" \
  -F model="gpt-4o-transcribe"

VoxInput uploads a .wav file

So replaced the URL to localhost and the file to a .wav

curl http://localhost:8080/api/v1/audio/transcriptions \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "Content-Type: multipart/form-data" \
  -F file="@audio.wav" \
  -F model="gpt-4o-transcribe"

But this doesn't work, the logs show this

sept. 22 01:57:09 framework-16 open-webui[439306]: 2025-09-22 01:57:09.271 | INFO     | open_webui.routers.audio:transcription:944 - file.content_type: application/octet-stream
sept. 22 01:57:09 framework-16 open-webui[439306]: 2025-09-22 01:57:09.272 | INFO     | uvicorn.protocols.http.h11_impl:send:473 - 127.0.0.1:34932 - "POST /api/v1/audio/transcriptions HTTP/1.1" 400

While the output of cURL is this

{"detail":"Oops! It seems like the file format you're trying to upload is not supported. Please upload a file with a supported format and try again."}

I added ;type=audio/vnd.wave and it works

curl http://localhost:8080/api/v1/audio/transcriptions \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "Content-Type: multipart/form-data" \
  -F file="@audio.wav;type=audio/vnd.wave" \
  -F model="gpt-4o-transcribe"

The minimum viable command seems to be this one

curl http://localhost:8080/api/v1/audio/transcriptions \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -F file="@audio.wav;type=audio/vnd.wave"

I would expect that the /transcriptions endpoint works even when without the content type of the file

curl http://localhost:8080/api/v1/audio/transcriptions \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -F file="@audio.wav"

Should it be possible for the /transcriptions to work without the content type of the file as per the OpenAI doc shows, please?

This should allow anyone to use VoxInput

Actual Behavior

There are errors

sept. 22 01:57:09 framework-16 open-webui[439306]: 2025-09-22 01:57:09.271 | INFO     | open_webui.routers.audio:transcription:944 - file.content_type: application/octet-stream
sept. 22 01:57:09 framework-16 open-webui[439306]: 2025-09-22 01:57:09.272 | INFO     | uvicorn.protocols.http.h11_impl:send:473 - 127.0.0.1:34932 - "POST /api/v1/audio/transcriptions HTTP/1.1" 400
{"detail":"Oops! It seems like the file format you're trying to upload is not supported. Please upload a file with a supported format and try again."}

Steps to Reproduce

  1. Start Open WebUI
  2. Get your API key
  3. Get / record an audio file
  4. Try to transcribe it without content type
curl http://localhost:8080/api/v1/audio/transcriptions \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -F file="@audio.wav"

Logs & Screenshots

sept. 22 02:02:09 framework-16 open-webui[439306]: 2025-09-22 02:02:09.919 | INFO     | open_webui.routers.audio:transcription:944 - file.content_type: None

/* really long log */

sept. 22 02:02:09 framework-16 open-webui[439306]:   File "/nix/store/p5brdf6qg9wn34z4gl55bm0anr0izahi-open-webui-0.6.28/lib/python3.13/site-packages/open_webui/routers/audio.py", line 951, in <genexpr>
sept. 22 02:02:09 framework-16 open-webui[439306]:     fnmatch(file.content_type, content_type)
sept. 22 02:02:09 framework-16 open-webui[439306]:     ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sept. 22 02:02:09 framework-16 open-webui[439306]:   File "/nix/store/829wb290i87wngxlh404klwxql5v18p4-python3-3.13.7/lib/python3.13/fnmatch.py", line 34, in fnmatch
sept. 22 02:02:09 framework-16 open-webui[439306]:     name = os.path.normcase(name)
sept. 22 02:02:09 framework-16 open-webui[439306]:   File "<frozen posixpath>", line 55, in normcase
sept. 22 02:02:09 framework-16 open-webui[439306]: TypeError: expected str, bytes or os.PathLike object, not NoneType

Additional Information

You can see my environment variables here
db27af6be5/systems/service/ollama.nix (L27)

Related to https://github.com/open-webui/open-webui/discussions/17071, https://github.com/open-webui/open-webui/issues/17067

Related to https://github.com/richiejp/VoxInput/issues/13

Originally created by @pinage404 on GitHub (Sep 22, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/17636 ### Check Existing Issues - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method I use [Nix](https://search.nixos.org/options?channel=25.05&show=services.open-webui.enable&query=open-webui) ### Open WebUI Version v0.6.28 (this is not the latest but it seems that there is no changes on this part) ### Ollama Version (if applicable) _No response_ ### Operating System NixOS, 25.05 (Warbler), 25.05.20250918.d2ed996 ### Browser (if applicable) _No response_ ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior Hello I'm trying to use [VoxInput](https://github.com/richiejp/VoxInput) with Open WebUI VoxInput is a tool that transcribes input from your microphone and turns it into key presses on a virtual keyboard When i try to use VoxInput with Open WebUI, i get these logs ```log sept. 22 02:02:09 framework-16 open-webui[439306]: 2025-09-22 02:02:09.919 | INFO | open_webui.routers.audio:transcription:944 - file.content_type: None /* really long log */ sept. 22 02:02:09 framework-16 open-webui[439306]: File "/nix/store/p5brdf6qg9wn34z4gl55bm0anr0izahi-open-webui-0.6.28/lib/python3.13/site-packages/open_webui/routers/audio.py", line 951, in <genexpr> sept. 22 02:02:09 framework-16 open-webui[439306]: fnmatch(file.content_type, content_type) sept. 22 02:02:09 framework-16 open-webui[439306]: ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ sept. 22 02:02:09 framework-16 open-webui[439306]: File "/nix/store/829wb290i87wngxlh404klwxql5v18p4-python3-3.13.7/lib/python3.13/fnmatch.py", line 34, in fnmatch sept. 22 02:02:09 framework-16 open-webui[439306]: name = os.path.normcase(name) sept. 22 02:02:09 framework-16 open-webui[439306]: File "<frozen posixpath>", line 55, in normcase sept. 22 02:02:09 framework-16 open-webui[439306]: TypeError: expected str, bytes or os.PathLike object, not NoneType ``` The first log seems to come from this line https://github.com/open-webui/open-webui/blob/6bc5d331a27c5106f492213510a763effa316faf/backend/open_webui/routers/audio.py#L944 The error seems to come from this one https://github.com/open-webui/open-webui/blob/6bc5d331a27c5106f492213510a763effa316faf/backend/open_webui/routers/audio.py#L951 VoxInput uses [go-openai](https://github.com/sashabaranov/go-openai) to make their requests to an OpenAI compatible API ```mermaid flowchart LR VoxInput --> go-openai --> OpenWebUI["Open WebUI"] ``` go-openai doesn't send content type of the uploaded file [OpenAI's documentation](https://platform.openai.com/docs/api-reference/audio/createTranscription?lang=curl) shows an example with cURL ```sh curl https://api.openai.com/v1/audio/transcriptions \ -H "Authorization: Bearer $OPENAI_API_KEY" \ -H "Content-Type: multipart/form-data" \ -F file="@/path/to/file/audio.mp3" \ -F model="gpt-4o-transcribe" ``` VoxInput uploads a `.wav` file So replaced the URL to localhost and the file to a `.wav` ```sh curl http://localhost:8080/api/v1/audio/transcriptions \ -H "Authorization: Bearer $OPENAI_API_KEY" \ -H "Content-Type: multipart/form-data" \ -F file="@audio.wav" \ -F model="gpt-4o-transcribe" ``` But this doesn't work, the logs show this ```log sept. 22 01:57:09 framework-16 open-webui[439306]: 2025-09-22 01:57:09.271 | INFO | open_webui.routers.audio:transcription:944 - file.content_type: application/octet-stream sept. 22 01:57:09 framework-16 open-webui[439306]: 2025-09-22 01:57:09.272 | INFO | uvicorn.protocols.http.h11_impl:send:473 - 127.0.0.1:34932 - "POST /api/v1/audio/transcriptions HTTP/1.1" 400 ``` While the output of cURL is this ```json {"detail":"Oops! It seems like the file format you're trying to upload is not supported. Please upload a file with a supported format and try again."} ``` I added `;type=audio/vnd.wave` and it works ```sh curl http://localhost:8080/api/v1/audio/transcriptions \ -H "Authorization: Bearer $OPENAI_API_KEY" \ -H "Content-Type: multipart/form-data" \ -F file="@audio.wav;type=audio/vnd.wave" \ -F model="gpt-4o-transcribe" ``` The minimum viable command seems to be this one ```sh curl http://localhost:8080/api/v1/audio/transcriptions \ -H "Authorization: Bearer $OPENAI_API_KEY" \ -F file="@audio.wav;type=audio/vnd.wave" ``` I would expect that the `/transcriptions` endpoint works even when without the content type of the file ```sh curl http://localhost:8080/api/v1/audio/transcriptions \ -H "Authorization: Bearer $OPENAI_API_KEY" \ -F file="@audio.wav" ``` Should it be possible for the `/transcriptions` to work without the content type of the file as per the OpenAI doc shows, please? This should allow anyone to use VoxInput ### Actual Behavior There are errors ```log sept. 22 01:57:09 framework-16 open-webui[439306]: 2025-09-22 01:57:09.271 | INFO | open_webui.routers.audio:transcription:944 - file.content_type: application/octet-stream sept. 22 01:57:09 framework-16 open-webui[439306]: 2025-09-22 01:57:09.272 | INFO | uvicorn.protocols.http.h11_impl:send:473 - 127.0.0.1:34932 - "POST /api/v1/audio/transcriptions HTTP/1.1" 400 ``` ```json {"detail":"Oops! It seems like the file format you're trying to upload is not supported. Please upload a file with a supported format and try again."} ``` ### Steps to Reproduce 1. Start Open WebUI 2. Get your API key 3. Get / record an audio file 4. Try to transcribe it without content type ```sh curl http://localhost:8080/api/v1/audio/transcriptions \ -H "Authorization: Bearer $OPENAI_API_KEY" \ -F file="@audio.wav" ``` ### Logs & Screenshots ```log sept. 22 02:02:09 framework-16 open-webui[439306]: 2025-09-22 02:02:09.919 | INFO | open_webui.routers.audio:transcription:944 - file.content_type: None /* really long log */ sept. 22 02:02:09 framework-16 open-webui[439306]: File "/nix/store/p5brdf6qg9wn34z4gl55bm0anr0izahi-open-webui-0.6.28/lib/python3.13/site-packages/open_webui/routers/audio.py", line 951, in <genexpr> sept. 22 02:02:09 framework-16 open-webui[439306]: fnmatch(file.content_type, content_type) sept. 22 02:02:09 framework-16 open-webui[439306]: ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ sept. 22 02:02:09 framework-16 open-webui[439306]: File "/nix/store/829wb290i87wngxlh404klwxql5v18p4-python3-3.13.7/lib/python3.13/fnmatch.py", line 34, in fnmatch sept. 22 02:02:09 framework-16 open-webui[439306]: name = os.path.normcase(name) sept. 22 02:02:09 framework-16 open-webui[439306]: File "<frozen posixpath>", line 55, in normcase sept. 22 02:02:09 framework-16 open-webui[439306]: TypeError: expected str, bytes or os.PathLike object, not NoneType ``` ### Additional Information You can see my environment variables here https://gitlab.com/pinage404/dotfiles/-/blob/db27af6be5ee676d187b3b741ae5d17e5441d3dc/systems/service/ollama.nix#L27 Related to https://github.com/open-webui/open-webui/discussions/17071, https://github.com/open-webui/open-webui/issues/17067 Related to https://github.com/richiejp/VoxInput/issues/13
GiteaMirror added the bug label 2026-05-15 13:57:13 -05:00
Author
Owner

@tjbck commented on GitHub (Sep 22, 2025):

Can we get a file for this?

<!-- gh-comment-id:3316462767 --> @tjbck commented on GitHub (Sep 22, 2025): Can we get a file for this?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#89088