mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 02:48:13 -05:00
[PR #23661] [CLOSED] feat(audio): add AUDIO_STT_SKIP_PREPROCESSING to skip pydub preprocessing #27307
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/23661
Author: @runixer
Created: 4/13/2026
Status: ❌ Closed
Base:
dev← Head:feat/skip-audio-preprocessing📝 Commits (1)
b802da4feat: add AUDIO_STT_SKIP_PREPROCESSING to bypass audio conversion/compression/splitting📊 Changes
3 files changed (+41 additions, -21 deletions)
View changed files
📝
backend/open_webui/config.py(+6 -0)📝
backend/open_webui/main.py(+2 -0)📝
backend/open_webui/routers/audio.py(+33 -21)📄 Description
Description
When uploading large audio files,
pydubloads the entire file into RAM (3-5× expansion for AAC → PCM decoding), causing OOM in containers with normal memory limits. See #21515.Self-hosted STT backends (vLLM Whisper with
[audio]extras, faster-whisper servers, etc.) handle all formats natively via ffmpeg/PyAV and have no file size limit — preprocessing is unnecessary overhead.This PR adds an env var
AUDIO_STT_SKIP_PREPROCESSING(default:false) to skipconvert_audio_to_mp3/compress_audio/split_audioand send the file as-is to the STT backend. Fully backward-compatible. pydub imports are now lazy (inside the functions that use them).Added
AUDIO_STT_SKIP_PREPROCESSINGenv var / admin config optionFixed
Breaking Changes
falsepreserves current behavior.Testing
Kubernetes deployment with vLLM 0.19.0 Whisper:
Pod memory during processing: ~640 MiB (vs 4-6 GB spike → OOMKill before).
Running in production for ~5 days. No regressions, no OOMs, users uploading large audio files daily.
Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.