mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 14:39:31 -05:00
[GH-ISSUE #6926] enh: Provide language to OpenAI STT API #30065
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?
Originally created by @mike-stewart on GitHub (Nov 13, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/6926
Feature Request
Is your feature request related to a problem? Please describe.
We have seen a few instances where a user's speech input is garbled and interpreted by OpenAI speech-to-text as another language. This causes incorrect input, made even worse because then OpenAI responds in that other language for all subsequent messages.
Describe the solution you'd like
Could we modify the input to the OpenAI API to provide the language from the user's settings?
Based on the OpenAI docs, it looks like we'd just need to provide the language parameter here:
96c865404d/backend/open_webui/apps/audio/main.py (L434)Describe alternatives you've considered
N/A
Additional context
According to the OpenAI docs, providing the language may also improve performance:
@nengoxx commented on GitHub (Dec 21, 2024):
Could I also suggest it for local, along with the VAD (voice activity detection) filter? It really improves quality, and the VAD almost completely suppresses the annoying hallucinations that whisper usually has.
It's in line 470:
29a2719595/backend/open_webui/apps/audio/main.py (L470)I'm currently using it via pip just for that reason:
segments, info = model.transcribe(file_path, language="en", beam_size=5, vad_filter=True)