[GH-ISSUE #17719] feat: Add multilingual FastWhisper support for high-privacy local audio transcription #33905

Closed
opened 2026-04-25 07:46:59 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @pcleau on GitHub (Sep 24, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/17719

Check Existing Issues

  • I have searched the existing issues and discussions.

Problem Description

Currently, when using OpenWebUI with the faster-whisper backend, the local transcription handler (openwebui.faster_whisper.transcription_handler) only uses the default value of the WhisperModel.multilingual parameter.

This creates a limitation:

For users who need to transcribe multilingual audio files locally in high-privacy contexts (without sending data externally), there is no way to enable multilingual mode.

As a result, transcription quality degrades significantly for non-English or mixed-language inputs.

At the moment, there is no documented way to set faster_whisper.WhisperModel.multilingual = True.

see here: 6bc5d331a2/backend/open_webui/routers/audio.py (L545-L569)

Desired Solution you'd like

Introduce a simple configuration option to unlock multilingual support.

Proposal:

Add a new environment variable (e.g. WHISPER_MULTILINGUAL) in config.py.

Pass it into the transcription handler so that it directly controls the multilingual flag in faster-whisper.

Example integration in transcription_handler:

def transcription_handler(request, file_path, metadata): 
     filename = os.path.basename(file_path) 
     file_dir = os.path.dirname(file_path) 
     id = filename.split(".")[0] 
  
     metadata = metadata or {} 
  
     languages = [ 
         metadata.get("language", None) if not WHISPER_LANGUAGE else WHISPER_LANGUAGE, 
         None,  # Always fallback to None in case transcription fails 
     ] 
  
     if request.app.state.config.STT_ENGINE == "": 
         if request.app.state.faster_whisper_model is None: 
             request.app.state.faster_whisper_model = set_faster_whisper_model( 
                 request.app.state.config.WHISPER_MODEL 
             ) 
  
         model = request.app.state.faster_whisper_model 
         segments, info = model.transcribe( 
             file_path, 
             beam_size=5, 
             vad_filter=request.app.state.config.WHISPER_VAD_FILTER, 
             language=languages[0], 
            
            ## add multiligual support
             multilingual=request.app.state.config.WHISPER_MULTILIGUAL,**
         ) 

Alternatives Considered

No response

Additional Context

Why This Matters

  • Privacy-first use case: Many users (researchers, healthcare, corporate, government) need local transcription without sending audio externally.

  • Improved accuracy: Enabling multilingual mode dramatically improves results on non-English or mixed-language content.

  • Minimal change: This requires only a few lines of code and does not alter existing defaults, so it is safe and backward-compatible.

  • Flexibility: Keeps English-only use cases fast while enabling multilingual transcription for those who need it.

Impact

This small enhancement empowers OpenWebUI to better support a global user base with multilingual, privacy-preserving transcription, aligning with the project’s open and inclusive vision.

Originally created by @pcleau on GitHub (Sep 24, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/17719 ### Check Existing Issues - [x] I have searched the existing issues and discussions. ### Problem Description Currently, when using OpenWebUI with the faster-whisper backend, the local transcription handler (openwebui.faster_whisper.transcription_handler) only uses the default value of the WhisperModel.multilingual parameter. This creates a limitation: For users who need to transcribe multilingual audio files locally in high-privacy contexts (without sending data externally), there is no way to enable multilingual mode. As a result, transcription quality degrades significantly for non-English or mixed-language inputs. At the moment, there is no documented way to set faster_whisper.WhisperModel.multilingual = True. see here: https://github.com/open-webui/open-webui/blob/6bc5d331a27c5106f492213510a763effa316faf/backend/open_webui/routers/audio.py#L545-L569 ### Desired Solution you'd like Introduce a simple configuration option to unlock multilingual support. Proposal: Add a new environment variable (e.g. WHISPER_MULTILINGUAL) in config.py. Pass it into the transcription handler so that it directly controls the multilingual flag in faster-whisper. Example integration in transcription_handler: ```python def transcription_handler(request, file_path, metadata): filename = os.path.basename(file_path) file_dir = os.path.dirname(file_path) id = filename.split(".")[0] metadata = metadata or {} languages = [ metadata.get("language", None) if not WHISPER_LANGUAGE else WHISPER_LANGUAGE, None, # Always fallback to None in case transcription fails ] if request.app.state.config.STT_ENGINE == "": if request.app.state.faster_whisper_model is None: request.app.state.faster_whisper_model = set_faster_whisper_model( request.app.state.config.WHISPER_MODEL ) model = request.app.state.faster_whisper_model segments, info = model.transcribe( file_path, beam_size=5, vad_filter=request.app.state.config.WHISPER_VAD_FILTER, language=languages[0], ## add multiligual support multilingual=request.app.state.config.WHISPER_MULTILIGUAL,** ) ``` ### Alternatives Considered _No response_ ### Additional Context ### Why This Matters - **Privacy-first use case**: Many users (researchers, healthcare, corporate, government) need local transcription without sending audio externally. - **Improved accuracy**: Enabling multilingual mode dramatically improves results on non-English or mixed-language content. - **Minimal change**: This requires only a few lines of code and does not alter existing defaults, so it is safe and backward-compatible. - **Flexibility**: Keeps English-only use cases fast while enabling multilingual transcription for those who need it. ### Impact This small enhancement empowers OpenWebUI to better support a global user base with **multilingual**, **privacy-preserving transcription**, aligning with the project’s open and inclusive vision.
Author
Owner

@tjbck commented on GitHub (Jan 9, 2026):

Addressed in dev.

<!-- gh-comment-id:3729443634 --> @tjbck commented on GitHub (Jan 9, 2026): Addressed in dev.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#33905