[GH-ISSUE #11363] issue: 400 Client Error (Audio) #16201

Closed
opened 2026-04-19 22:12:51 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @YuriyGavrilov on GitHub (Mar 7, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/11363

Check Existing Issues

  • I have searched the existing issues and discussions.

Installation Method

Other

Open WebUI Version

v0.5.18

Ollama Version (if applicable)

No response

Operating System

Kubernates

Browser (if applicable)

Chrome

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 checked the browser console logs.
  • I have checked the Docker container logs.
  • I have listed steps to reproduce the bug in detail.

Expected Behavior

Voice chat works properly

Actual Behavior

[ERROR: 400: [ERROR: Open WebUI: Server Connection Error]]

Steps to Reproduce

  1. setup whisper 1
  2. Record audio
  3. whaiting error

Logs & Screenshots


ERROR [open_webui.routers.audio] 400: [ERROR: Open WebUI: Server Connection Error]
Traceback (most recent call last):
  File "/app/backend/open_webui/routers/audio.py", line 501, in transcribe
    r.raise_for_status()
  File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 1024, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://XXXXXXXXXX/openai/v1/audio/transcriptions

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/backend/open_webui/routers/audio.py", line 582, in transcription
    data = transcribe(request, file_path)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/routers/audio.py", line 522, in transcribe
    raise Exception(detail if detail else "Open WebUI: Server Connection Error")
Exception: Open WebUI: Server Connection Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/backend/open_webui/routers/audio.py", line 588, in transcription
    raise HTTPException(
fastapi.exceptions.HTTPException: 400: [ERROR: Open WebUI: Server Connection Error]
INFO:     10.5.32.114:0 - "POST /api/v1/audio/transcriptions HTTP/1.1" 400 Bad Request
INFO:     connection closed
WARNI [python_multipart.multipart] Skipping data after last boundary
INFO  [open_webui.routers.audio] file.content_type: audio/wav
transcribe /app/backend/data/cache/audio/transcriptions/86e82464-3651-469f-93d8-e6fe6c2ccbd8.wav
INFO:     ('172.27.126.151', 0) - "WebSocket /ws/socket.io/?EIO=4&transport=websocket" [accepted]
INFO:     connection open
ERROR [open_webui.routers.audio] 400 Client Error: Bad Request for url: https://XXXXXXXXXX/openai/v1/audio/transcriptions
Traceback (most recent call last):
  File "/app/backend/open_webui/routers/audio.py", line 501, in transcribe
    r.raise_for_status()
  File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 1024, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://XXXXXXXXXX/openai/v1/audio/transcriptions
ERROR [open_webui.routers.audio] Open WebUI: Server Connection Error
Traceback (most recent call last):
  File "/app/backend/open_webui/routers/audio.py", line 501, in transcribe
    r.raise_for_status()
  File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 1024, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://XXXXXXXXXX/openai/v1/audio/transcriptions

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/backend/open_webui/routers/audio.py", line 582, in transcription
    data = transcribe(request, file_path)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/routers/audio.py", line 522, in transcribe
    raise Exception(detail if detail else "Open WebUI: Server Connection Error")
Exception: Open WebUI: Server Connection Error
ERROR [open_webui.routers.audio] 400: [ERROR: Open WebUI: Server Connection Error]
Traceback (most recent call last):
  File "/app/backend/open_webui/routers/audio.py", line 501, in transcribe
    r.raise_for_status()
  File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 1024, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://XXXXXXXXXX/openai/v1/audio/transcriptions

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/backend/open_webui/routers/audio.py", line 582, in transcription
    data = transcribe(request, file_path)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/routers/audio.py", line 522, in transcribe
    raise Exception(detail if detail else "Open WebUI: Server Connection Error")
Exception: Open WebUI: Server Connection Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/backend/open_webui/routers/audio.py", line 588, in transcription
    raise HTTPException(
fastapi.exceptions.HTTPException: 400: [ERROR: Open WebUI: Server Connection Error]
INFO:     10.5.32.114:0 - "POST /api/v1/audio/transcriptions HTTP/1.1" 400 Bad Request

Additional Information

Originally created by @YuriyGavrilov on GitHub (Mar 7, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/11363 ### Check Existing Issues - [x] I have searched the existing issues and discussions. ### Installation Method Other ### Open WebUI Version v0.5.18 ### Ollama Version (if applicable) _No response_ ### Operating System Kubernates ### Browser (if applicable) Chrome ### 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 checked the browser console logs. - [x] I have checked the Docker container logs. - [x] I have listed steps to reproduce the bug in detail. ### Expected Behavior Voice chat works properly ### Actual Behavior [ERROR: 400: [ERROR: Open WebUI: Server Connection Error]] ### Steps to Reproduce 1. setup whisper 1 2. Record audio 3. whaiting error ### Logs & Screenshots ``` ERROR [open_webui.routers.audio] 400: [ERROR: Open WebUI: Server Connection Error] Traceback (most recent call last): File "/app/backend/open_webui/routers/audio.py", line 501, in transcribe r.raise_for_status() File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 1024, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://XXXXXXXXXX/openai/v1/audio/transcriptions During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/app/backend/open_webui/routers/audio.py", line 582, in transcription data = transcribe(request, file_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/routers/audio.py", line 522, in transcribe raise Exception(detail if detail else "Open WebUI: Server Connection Error") Exception: Open WebUI: Server Connection Error During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/app/backend/open_webui/routers/audio.py", line 588, in transcription raise HTTPException( fastapi.exceptions.HTTPException: 400: [ERROR: Open WebUI: Server Connection Error] INFO: 10.5.32.114:0 - "POST /api/v1/audio/transcriptions HTTP/1.1" 400 Bad Request INFO: connection closed WARNI [python_multipart.multipart] Skipping data after last boundary INFO [open_webui.routers.audio] file.content_type: audio/wav transcribe /app/backend/data/cache/audio/transcriptions/86e82464-3651-469f-93d8-e6fe6c2ccbd8.wav INFO: ('172.27.126.151', 0) - "WebSocket /ws/socket.io/?EIO=4&transport=websocket" [accepted] INFO: connection open ERROR [open_webui.routers.audio] 400 Client Error: Bad Request for url: https://XXXXXXXXXX/openai/v1/audio/transcriptions Traceback (most recent call last): File "/app/backend/open_webui/routers/audio.py", line 501, in transcribe r.raise_for_status() File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 1024, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://XXXXXXXXXX/openai/v1/audio/transcriptions ERROR [open_webui.routers.audio] Open WebUI: Server Connection Error Traceback (most recent call last): File "/app/backend/open_webui/routers/audio.py", line 501, in transcribe r.raise_for_status() File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 1024, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://XXXXXXXXXX/openai/v1/audio/transcriptions During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/app/backend/open_webui/routers/audio.py", line 582, in transcription data = transcribe(request, file_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/routers/audio.py", line 522, in transcribe raise Exception(detail if detail else "Open WebUI: Server Connection Error") Exception: Open WebUI: Server Connection Error ERROR [open_webui.routers.audio] 400: [ERROR: Open WebUI: Server Connection Error] Traceback (most recent call last): File "/app/backend/open_webui/routers/audio.py", line 501, in transcribe r.raise_for_status() File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 1024, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://XXXXXXXXXX/openai/v1/audio/transcriptions During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/app/backend/open_webui/routers/audio.py", line 582, in transcription data = transcribe(request, file_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/routers/audio.py", line 522, in transcribe raise Exception(detail if detail else "Open WebUI: Server Connection Error") Exception: Open WebUI: Server Connection Error During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/app/backend/open_webui/routers/audio.py", line 588, in transcription raise HTTPException( fastapi.exceptions.HTTPException: 400: [ERROR: Open WebUI: Server Connection Error] INFO: 10.5.32.114:0 - "POST /api/v1/audio/transcriptions HTTP/1.1" 400 Bad Request ``` ### Additional Information <!-- Failed to upload "image.png" -->
GiteaMirror added the bug label 2026-04-19 22:12:51 -05:00
Author
Owner

@FedorRasputin commented on GitHub (Mar 8, 2025):

I have the same issue.
I downloaded the generated file and tried to upload it via Postman, but I got this error: "Cannot extract audio duration. Invalid file or format."
After that, I tried to upload a simple WAV file with audio, and it was successfully recognized.

I use a proxyapi for accessing the OpenAI API, so I can't check this issue on the native OpenAI API.\

UPD

On another API provider, the problem persists as well.

<!-- gh-comment-id:2708350002 --> @FedorRasputin commented on GitHub (Mar 8, 2025): I have the same issue. I downloaded the generated file and tried to upload it via Postman, but I got this error: "Cannot extract audio duration. Invalid file or format." After that, I tried to upload a simple WAV file with audio, and it was successfully recognized. I use a proxyapi for accessing the OpenAI API, so I can't check this issue on the native OpenAI API.\ UPD On another API provider, the problem persists as well.
Author
Owner

@michaelmarziani commented on GitHub (Mar 12, 2025):

@YuriyGavrilov I'm unable to reproduce this error on my setup. I use local whisper and I've picked a different model, as you can see in my setup below.

Image

Please upload a screenshot of your audio settings, as I think something looks odd with the error you received:

400 Client Error: Bad Request for url: https://XXXXXXXXXX/openai/v1/audio/transcriptions

@FedorRasputin Please post the stack trace from the console for your error.

<!-- gh-comment-id:2716761196 --> @michaelmarziani commented on GitHub (Mar 12, 2025): @YuriyGavrilov I'm unable to reproduce this error on my setup. I use local whisper and I've picked a different model, as you can see in my setup below. ![Image](https://github.com/user-attachments/assets/00627d06-b338-4502-a6f0-a768052ab623) Please upload a screenshot of your audio settings, as I think something looks odd with the error you received: > 400 Client Error: Bad Request for url: https://XXXXXXXXXX/openai/v1/audio/transcriptions @FedorRasputin Please post the stack trace from the console for your error.
Author
Owner

@FedorRasputin commented on GitHub (Mar 12, 2025):

@michaelmarziani Hello.
My settings:

Image

Stack trace from console:

openwebui-1  | 2025-03-12 09:25:34.615 | INFO     | open_webui.routers.audio:transcription:626 - file.content_type: audio/wav - {}
openwebui-1  | 2025-03-12 09:25:34.616 | INFO     | open_webui.routers.audio:transcribe:470 - transcribe: /app/backend/data/cache/audio/transcriptions/332e9408-5fc4-4f0c-9544-6e1bccb13f8f.wav - {}
openwebui-1  | 2025-03-12 09:25:35.425 | ERROR    | open_webui.routers.audio:transcribe:525 - 400 Client Error: Bad Request for url: https://api.proxyapi.ru/openai/v1/audio/transcriptions - {}
openwebui-1  | Traceback (most recent call last):
openwebui-1  |
openwebui-1  |   File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap
openwebui-1  |     self._bootstrap_inner()
openwebui-1  |     │    └ <function Thread._bootstrap_inner at 0x7f4dda1b0860>
openwebui-1  |     └ <WorkerThread(AnyIO worker thread, started 139970081707712)>
openwebui-1  |   File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
openwebui-1  |     self.run()
openwebui-1  |     │    └ <function WorkerThread.run at 0x7f4d58a2f240>
openwebui-1  |     └ <WorkerThread(AnyIO worker thread, started 139970081707712)>
openwebui-1  |   File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 962, in run
openwebui-1  |     result = context.run(func, *args)
openwebui-1  |              │       │   │      └ ()
openwebui-1  |              │       │   └ functools.partial(<function transcription at 0x7f4da1c6d800>, user=UserModel(id='ac937b6f-5a44-4edb-adb0-f46401b4f8a0', name=...
openwebui-1  |              │       └ <method 'run' of '_contextvars.Context' objects>
openwebui-1  |              └ <_contextvars.Context object at 0x7f4d58826500>
openwebui-1  |
openwebui-1  |   File "/app/backend/open_webui/routers/audio.py", line 659, in transcription
openwebui-1  |     data = transcribe(request, file_path)
openwebui-1  |            │          │        └ '/app/backend/data/cache/audio/transcriptions/332e9408-5fc4-4f0c-9544-6e1bccb13f8f.wav'
openwebui-1  |            │          └ <starlette.requests.Request object at 0x7f4d5880af50>
openwebui-1  |            └ <function transcribe at 0x7f4da1c6dc60>
openwebui-1  |
openwebui-1  | > File "/app/backend/open_webui/routers/audio.py", line 515, in transcribe
openwebui-1  |     r.raise_for_status()
openwebui-1  |     │ └ <function Response.raise_for_status at 0x7f4dd6b51120>
openwebui-1  |     └ <Response [400]>
openwebui-1  |
openwebui-1  |   File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 1024, in raise_for_status
openwebui-1  |     raise HTTPError(http_error_msg, response=self)
openwebui-1  |           │         │                        └ <Response [400]>
openwebui-1  |           │         └ '400 Client Error: Bad Request for url: https://api.proxyapi.ru/openai/v1/audio/transcriptions'
openwebui-1  |           └ <class 'requests.exceptions.HTTPError'>
openwebui-1  |
openwebui-1  | requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.proxyapi.ru/openai/v1/audio/transcriptions
openwebui-1  | 2025-03-12 09:25:35.430 | ERROR    | open_webui.routers.audio:transcription:663 - Open WebUI: Server Connection Error - {}
openwebui-1  | Traceback (most recent call last):
openwebui-1  |
openwebui-1  |   File "/app/backend/open_webui/routers/audio.py", line 515, in transcribe
openwebui-1  |     r.raise_for_status()
openwebui-1  |     │ └ <function Response.raise_for_status at 0x7f4dd6b51120>
openwebui-1  |     └ <Response [400]>
openwebui-1  |
openwebui-1  |   File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 1024, in raise_for_status
openwebui-1  |     raise HTTPError(http_error_msg, response=self)
openwebui-1  |           │         │                        └ <Response [400]>
openwebui-1  |           │         └ '400 Client Error: Bad Request for url: https://api.proxyapi.ru/openai/v1/audio/transcriptions'
openwebui-1  |           └ <class 'requests.exceptions.HTTPError'>
openwebui-1  |
openwebui-1  | requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.proxyapi.ru/openai/v1/audio/transcriptions
openwebui-1  |
openwebui-1  |
openwebui-1  | During handling of the above exception, another exception occurred:
openwebui-1  |
openwebui-1  |
openwebui-1  | Traceback (most recent call last):
openwebui-1  |
openwebui-1  |   File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap
openwebui-1  |     self._bootstrap_inner()
openwebui-1  |     │    └ <function Thread._bootstrap_inner at 0x7f4dda1b0860>
openwebui-1  |     └ <WorkerThread(AnyIO worker thread, started 139970081707712)>
openwebui-1  |   File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
openwebui-1  |     self.run()
openwebui-1  |     │    └ <function WorkerThread.run at 0x7f4d58a2f240>
openwebui-1  |     └ <WorkerThread(AnyIO worker thread, started 139970081707712)>
openwebui-1  |   File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 962, in run
openwebui-1  |     result = context.run(func, *args)
openwebui-1  |              │       │   │      └ ()
openwebui-1  |              │       │   └ functools.partial(<function transcription at 0x7f4da1c6d800>, user=UserModel(id='ac937b6f-5a44-4edb-adb0-f46401b4f8a0', name=...
openwebui-1  |              │       └ <method 'run' of '_contextvars.Context' objects>
openwebui-1  |              └ <_contextvars.Context object at 0x7f4d58826500>
openwebui-1  |
openwebui-1  | > File "/app/backend/open_webui/routers/audio.py", line 659, in transcription
openwebui-1  |     data = transcribe(request, file_path)
openwebui-1  |            │          │        └ '/app/backend/data/cache/audio/transcriptions/332e9408-5fc4-4f0c-9544-6e1bccb13f8f.wav'
openwebui-1  |            │          └ <starlette.requests.Request object at 0x7f4d5880af50>
openwebui-1  |            └ <function transcribe at 0x7f4da1c6dc60>
openwebui-1  |
openwebui-1  |   File "/app/backend/open_webui/routers/audio.py", line 536, in transcribe
openwebui-1  |     raise Exception(detail if detail else "Open WebUI: Server Connection Error")
openwebui-1  |                     │         └ None
openwebui-1  |                     └ None
openwebui-1  |
openwebui-1  | Exception: Open WebUI: Server Connection Error
openwebui-1  | 2025-03-12 09:25:35.431 | ERROR    | open_webui.routers.audio:transcription:671 - 400: [ERROR: Open WebUI: Server Connection Error] - {}
openwebui-1  | Traceback (most recent call last):
openwebui-1  |
openwebui-1  |   File "/app/backend/open_webui/routers/audio.py", line 515, in transcribe
openwebui-1  |     r.raise_for_status()
openwebui-1  |     │ └ <function Response.raise_for_status at 0x7f4dd6b51120>
openwebui-1  |     └ <Response [400]>
openwebui-1  |
openwebui-1  |   File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 1024, in raise_for_status
openwebui-1  |     raise HTTPError(http_error_msg, response=self)
openwebui-1  |           │         │                        └ <Response [400]>
openwebui-1  |           │         └ '400 Client Error: Bad Request for url: https://api.proxyapi.ru/openai/v1/audio/transcriptions'
openwebui-1  |           └ <class 'requests.exceptions.HTTPError'>
openwebui-1  |
openwebui-1  | requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.proxyapi.ru/openai/v1/audio/transcriptions
openwebui-1  |
openwebui-1  |
openwebui-1  | During handling of the above exception, another exception occurred:
openwebui-1  |
openwebui-1  |
openwebui-1  | Traceback (most recent call last):
openwebui-1  |
openwebui-1  |   File "/app/backend/open_webui/routers/audio.py", line 659, in transcription
openwebui-1  |     data = transcribe(request, file_path)
openwebui-1  |            │          │        └ '/app/backend/data/cache/audio/transcriptions/332e9408-5fc4-4f0c-9544-6e1bccb13f8f.wav'
openwebui-1  |            │          └ <starlette.requests.Request object at 0x7f4d5880af50>
openwebui-1  |            └ <function transcribe at 0x7f4da1c6dc60>
openwebui-1  |
openwebui-1  |   File "/app/backend/open_webui/routers/audio.py", line 536, in transcribe
openwebui-1  |     raise Exception(detail if detail else "Open WebUI: Server Connection Error")
openwebui-1  |                     │         └ None
openwebui-1  |                     └ None
openwebui-1  |
openwebui-1  | Exception: Open WebUI: Server Connection Error
openwebui-1  |
openwebui-1  |
openwebui-1  | During handling of the above exception, another exception occurred:
openwebui-1  |
openwebui-1  |
openwebui-1  | Traceback (most recent call last):
openwebui-1  |
openwebui-1  |   File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap
openwebui-1  |     self._bootstrap_inner()
openwebui-1  |     │    └ <function Thread._bootstrap_inner at 0x7f4dda1b0860>
openwebui-1  |     └ <WorkerThread(AnyIO worker thread, started 139970081707712)>
openwebui-1  |   File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
openwebui-1  |     self.run()
openwebui-1  |     │    └ <function WorkerThread.run at 0x7f4d58a2f240>
openwebui-1  |     └ <WorkerThread(AnyIO worker thread, started 139970081707712)>
openwebui-1  |   File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 962, in run
openwebui-1  |     result = context.run(func, *args)
openwebui-1  |              │       │   │      └ ()
openwebui-1  |              │       │   └ functools.partial(<function transcription at 0x7f4da1c6d800>, user=UserModel(id='ac937b6f-5a44-4edb-adb0-f46401b4f8a0', name=...
openwebui-1  |              │       └ <method 'run' of '_contextvars.Context' objects>
openwebui-1  |              └ <_contextvars.Context object at 0x7f4d58826500>
openwebui-1  |
openwebui-1  | > File "/app/backend/open_webui/routers/audio.py", line 665, in transcription
openwebui-1  |     raise HTTPException(
openwebui-1  |           └ <class 'fastapi.exceptions.HTTPException'>
openwebui-1  |
openwebui-1  | fastapi.exceptions.HTTPException: 400: [ERROR: Open WebUI: Server Connection Error]
openwebui-1  | 2025-03-12 09:25:35.433 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 -  - "POST /api/v1/audio/transcriptions HTTP/1.1" 400 - {}

<!-- gh-comment-id:2717214806 --> @FedorRasputin commented on GitHub (Mar 12, 2025): @michaelmarziani Hello. My settings: ![Image](https://github.com/user-attachments/assets/49fb76d0-777e-46ec-8c6b-ef9744240687) Stack trace from console: ``` openwebui-1 | 2025-03-12 09:25:34.615 | INFO | open_webui.routers.audio:transcription:626 - file.content_type: audio/wav - {} openwebui-1 | 2025-03-12 09:25:34.616 | INFO | open_webui.routers.audio:transcribe:470 - transcribe: /app/backend/data/cache/audio/transcriptions/332e9408-5fc4-4f0c-9544-6e1bccb13f8f.wav - {} openwebui-1 | 2025-03-12 09:25:35.425 | ERROR | open_webui.routers.audio:transcribe:525 - 400 Client Error: Bad Request for url: https://api.proxyapi.ru/openai/v1/audio/transcriptions - {} openwebui-1 | Traceback (most recent call last): openwebui-1 | openwebui-1 | File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap openwebui-1 | self._bootstrap_inner() openwebui-1 | │ └ <function Thread._bootstrap_inner at 0x7f4dda1b0860> openwebui-1 | └ <WorkerThread(AnyIO worker thread, started 139970081707712)> openwebui-1 | File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner openwebui-1 | self.run() openwebui-1 | │ └ <function WorkerThread.run at 0x7f4d58a2f240> openwebui-1 | └ <WorkerThread(AnyIO worker thread, started 139970081707712)> openwebui-1 | File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 962, in run openwebui-1 | result = context.run(func, *args) openwebui-1 | │ │ │ └ () openwebui-1 | │ │ └ functools.partial(<function transcription at 0x7f4da1c6d800>, user=UserModel(id='ac937b6f-5a44-4edb-adb0-f46401b4f8a0', name=... openwebui-1 | │ └ <method 'run' of '_contextvars.Context' objects> openwebui-1 | └ <_contextvars.Context object at 0x7f4d58826500> openwebui-1 | openwebui-1 | File "/app/backend/open_webui/routers/audio.py", line 659, in transcription openwebui-1 | data = transcribe(request, file_path) openwebui-1 | │ │ └ '/app/backend/data/cache/audio/transcriptions/332e9408-5fc4-4f0c-9544-6e1bccb13f8f.wav' openwebui-1 | │ └ <starlette.requests.Request object at 0x7f4d5880af50> openwebui-1 | └ <function transcribe at 0x7f4da1c6dc60> openwebui-1 | openwebui-1 | > File "/app/backend/open_webui/routers/audio.py", line 515, in transcribe openwebui-1 | r.raise_for_status() openwebui-1 | │ └ <function Response.raise_for_status at 0x7f4dd6b51120> openwebui-1 | └ <Response [400]> openwebui-1 | openwebui-1 | File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 1024, in raise_for_status openwebui-1 | raise HTTPError(http_error_msg, response=self) openwebui-1 | │ │ └ <Response [400]> openwebui-1 | │ └ '400 Client Error: Bad Request for url: https://api.proxyapi.ru/openai/v1/audio/transcriptions' openwebui-1 | └ <class 'requests.exceptions.HTTPError'> openwebui-1 | openwebui-1 | requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.proxyapi.ru/openai/v1/audio/transcriptions openwebui-1 | 2025-03-12 09:25:35.430 | ERROR | open_webui.routers.audio:transcription:663 - Open WebUI: Server Connection Error - {} openwebui-1 | Traceback (most recent call last): openwebui-1 | openwebui-1 | File "/app/backend/open_webui/routers/audio.py", line 515, in transcribe openwebui-1 | r.raise_for_status() openwebui-1 | │ └ <function Response.raise_for_status at 0x7f4dd6b51120> openwebui-1 | └ <Response [400]> openwebui-1 | openwebui-1 | File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 1024, in raise_for_status openwebui-1 | raise HTTPError(http_error_msg, response=self) openwebui-1 | │ │ └ <Response [400]> openwebui-1 | │ └ '400 Client Error: Bad Request for url: https://api.proxyapi.ru/openai/v1/audio/transcriptions' openwebui-1 | └ <class 'requests.exceptions.HTTPError'> openwebui-1 | openwebui-1 | requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.proxyapi.ru/openai/v1/audio/transcriptions openwebui-1 | openwebui-1 | openwebui-1 | During handling of the above exception, another exception occurred: openwebui-1 | openwebui-1 | openwebui-1 | Traceback (most recent call last): openwebui-1 | openwebui-1 | File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap openwebui-1 | self._bootstrap_inner() openwebui-1 | │ └ <function Thread._bootstrap_inner at 0x7f4dda1b0860> openwebui-1 | └ <WorkerThread(AnyIO worker thread, started 139970081707712)> openwebui-1 | File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner openwebui-1 | self.run() openwebui-1 | │ └ <function WorkerThread.run at 0x7f4d58a2f240> openwebui-1 | └ <WorkerThread(AnyIO worker thread, started 139970081707712)> openwebui-1 | File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 962, in run openwebui-1 | result = context.run(func, *args) openwebui-1 | │ │ │ └ () openwebui-1 | │ │ └ functools.partial(<function transcription at 0x7f4da1c6d800>, user=UserModel(id='ac937b6f-5a44-4edb-adb0-f46401b4f8a0', name=... openwebui-1 | │ └ <method 'run' of '_contextvars.Context' objects> openwebui-1 | └ <_contextvars.Context object at 0x7f4d58826500> openwebui-1 | openwebui-1 | > File "/app/backend/open_webui/routers/audio.py", line 659, in transcription openwebui-1 | data = transcribe(request, file_path) openwebui-1 | │ │ └ '/app/backend/data/cache/audio/transcriptions/332e9408-5fc4-4f0c-9544-6e1bccb13f8f.wav' openwebui-1 | │ └ <starlette.requests.Request object at 0x7f4d5880af50> openwebui-1 | └ <function transcribe at 0x7f4da1c6dc60> openwebui-1 | openwebui-1 | File "/app/backend/open_webui/routers/audio.py", line 536, in transcribe openwebui-1 | raise Exception(detail if detail else "Open WebUI: Server Connection Error") openwebui-1 | │ └ None openwebui-1 | └ None openwebui-1 | openwebui-1 | Exception: Open WebUI: Server Connection Error openwebui-1 | 2025-03-12 09:25:35.431 | ERROR | open_webui.routers.audio:transcription:671 - 400: [ERROR: Open WebUI: Server Connection Error] - {} openwebui-1 | Traceback (most recent call last): openwebui-1 | openwebui-1 | File "/app/backend/open_webui/routers/audio.py", line 515, in transcribe openwebui-1 | r.raise_for_status() openwebui-1 | │ └ <function Response.raise_for_status at 0x7f4dd6b51120> openwebui-1 | └ <Response [400]> openwebui-1 | openwebui-1 | File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 1024, in raise_for_status openwebui-1 | raise HTTPError(http_error_msg, response=self) openwebui-1 | │ │ └ <Response [400]> openwebui-1 | │ └ '400 Client Error: Bad Request for url: https://api.proxyapi.ru/openai/v1/audio/transcriptions' openwebui-1 | └ <class 'requests.exceptions.HTTPError'> openwebui-1 | openwebui-1 | requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.proxyapi.ru/openai/v1/audio/transcriptions openwebui-1 | openwebui-1 | openwebui-1 | During handling of the above exception, another exception occurred: openwebui-1 | openwebui-1 | openwebui-1 | Traceback (most recent call last): openwebui-1 | openwebui-1 | File "/app/backend/open_webui/routers/audio.py", line 659, in transcription openwebui-1 | data = transcribe(request, file_path) openwebui-1 | │ │ └ '/app/backend/data/cache/audio/transcriptions/332e9408-5fc4-4f0c-9544-6e1bccb13f8f.wav' openwebui-1 | │ └ <starlette.requests.Request object at 0x7f4d5880af50> openwebui-1 | └ <function transcribe at 0x7f4da1c6dc60> openwebui-1 | openwebui-1 | File "/app/backend/open_webui/routers/audio.py", line 536, in transcribe openwebui-1 | raise Exception(detail if detail else "Open WebUI: Server Connection Error") openwebui-1 | │ └ None openwebui-1 | └ None openwebui-1 | openwebui-1 | Exception: Open WebUI: Server Connection Error openwebui-1 | openwebui-1 | openwebui-1 | During handling of the above exception, another exception occurred: openwebui-1 | openwebui-1 | openwebui-1 | Traceback (most recent call last): openwebui-1 | openwebui-1 | File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap openwebui-1 | self._bootstrap_inner() openwebui-1 | │ └ <function Thread._bootstrap_inner at 0x7f4dda1b0860> openwebui-1 | └ <WorkerThread(AnyIO worker thread, started 139970081707712)> openwebui-1 | File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner openwebui-1 | self.run() openwebui-1 | │ └ <function WorkerThread.run at 0x7f4d58a2f240> openwebui-1 | └ <WorkerThread(AnyIO worker thread, started 139970081707712)> openwebui-1 | File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 962, in run openwebui-1 | result = context.run(func, *args) openwebui-1 | │ │ │ └ () openwebui-1 | │ │ └ functools.partial(<function transcription at 0x7f4da1c6d800>, user=UserModel(id='ac937b6f-5a44-4edb-adb0-f46401b4f8a0', name=... openwebui-1 | │ └ <method 'run' of '_contextvars.Context' objects> openwebui-1 | └ <_contextvars.Context object at 0x7f4d58826500> openwebui-1 | openwebui-1 | > File "/app/backend/open_webui/routers/audio.py", line 665, in transcription openwebui-1 | raise HTTPException( openwebui-1 | └ <class 'fastapi.exceptions.HTTPException'> openwebui-1 | openwebui-1 | fastapi.exceptions.HTTPException: 400: [ERROR: Open WebUI: Server Connection Error] openwebui-1 | 2025-03-12 09:25:35.433 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - - "POST /api/v1/audio/transcriptions HTTP/1.1" 400 - {} ```
Author
Owner

@michaelmarziani commented on GitHub (Mar 13, 2025):

Hi @FedorRasputin, the way I read this, the error is here:

openwebui-1 | requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.proxyapi.ru/openai/v1/audio/transcriptions

A bad request in this context means that the server is rejecting this transcription request. Unfortunately there isn't enough detail in the error message to know why.

To troubleshoot, I would try different servers in my configuration. If this works, then you know it's a problem with this specific server, if you test a few servers and none of them work, either they all are having an issue or there might be a problem in the request code in OWUI.

Good luck!

<!-- gh-comment-id:2721235337 --> @michaelmarziani commented on GitHub (Mar 13, 2025): Hi @FedorRasputin, the way I read this, the error is here: > openwebui-1 | requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.proxyapi.ru/openai/v1/audio/transcriptions A bad request in this context means that the server is rejecting this transcription request. Unfortunately there isn't enough detail in the error message to know why. To troubleshoot, I would try different servers in my configuration. If this works, then you know it's a problem with this specific server, if you test a few servers and none of them work, either they all are having an issue or there might be a problem in the request code in OWUI. Good luck!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#16201