mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 03:18:23 -05:00
[PR #13376] [MERGED] feat: Added WHISPER_LANGUAGE env variable #23172
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/13376
Author: @Thaniel94
Created: 4/30/2025
Status: ✅ Merged
Merged: 5/2/2025
Merged by: @tjbck
Base:
dev← Head:add-whisper-language-constraint📝 Commits (3)
1efa708Added WHISPER_LANGUAGE env variable. If set to a country's ISO2, constrains Whisper's stt to that language. Detects language as normal if unsetef7acfbWHISPER_LANGUAGE no longer a "PersistentConfig" variable (Was not appropriate with how WHISPER_LANGUAGE is currently configured).cc14aacImprovements to parsing of WHISPER_LANGUAGE environment variable (Setting as empty string now equivalent to unsetting/removing WHISPER_LANGUAGE). Resolved crash caused when unset📊 Changes
3 files changed (+4 additions, -0 deletions)
View changed files
📝
backend/open_webui/config.py(+1 -0)📝
backend/open_webui/main.py(+1 -0)📝
backend/open_webui/routers/audio.py(+2 -0)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
See discussion post:
https://github.com/open-webui/open-webui/discussions/13240
Before submitting, make sure you've checked the following:
Target branch: Please verify that the pull request targets the
devbranch.Description: Provide a concise description of the changes made in this pull request.
Adds a new environment variable - 'WHISPER_LANGUAGE'. When set correctly, forces whisper stt to use the set language.
When unset, or set to an empty string, predicts the language as it did previously.
Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
Documentation: Have you updated relevant documentation Open WebUI Docs, or other documentation sources?
Should this be accepted, documentation change ready to be added in another pull request - https://github.com/Thaniel94/docs/tree/add-whisper-language-constraint.
Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
Testing: Have you written and run sufficient tests to validate the changes?
Code review: Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
Prefix: To clearly categorize this pull request, prefix the pull request title using one of the following:
Changelog Entry
Description
Added
Changed
Deprecated
Removed
Fixed
Security
Breaking Changes
Additional Information
Screenshots or Videos
-
Documentation additions for WHISPER_LANGUAGE (Assuming the change to the logic is acceptable in this pull request, I assume I would be adding another pull request for these doc changes, also considering whether a 'possible values' field should be added. Also appreciate the description in the second screenshot should specifically mention it sets the language for 'Local Whisper')


Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the CONTRIBUTOR_LICENSE_AGREEMENT, and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.