Sign inSign up

ericwang2006/whisper-webui

By ericwang2006

Updated about 1 year ago

A Docker-based WebUI for OpenAI Whisper supporting standard and Faster-Whisper models.

Image
Machine learning & AI
0

2.6K

ericwang2006/whisper-webui repository overview

whisper-webui Docker Stars whisper-webui Docker Pulls

Whisper WebUI

A Docker-based WebUI for OpenAI's Whisper speech recognition model with support for both standard Whisper and Faster-Whisper implementations.

The source code is available at https://github.com/ericwang2006/whisper-webui.

Usage

Using Standard Whisper
  1. Start WebUI with GPU Support
sudo docker run -d --gpus=all -p 7860:7860 ericwang2006/whisper-webui
  1. CLI Usage
sudo docker run --rm \
--gpus=all \
-v ./.cache/whisper:/root/.cache/whisper \
-v ./.cache/huggingface:/root/.cache/huggingface \
-v ./:/app/data \
ericwang2006/whisper-webui \
python3 cli.py --model medium --auto_parallel True \
--vad silero-vad-skip-gaps \
--vad_max_merge_size 8.0 \
--vad_merge_window 1.0 \
--vad_padding 0.3 \
--language Chinese \
--fp16 True \
--output_dir /app/data /app/data/example.mp4
Using Faster-Whisper
  1. Start WebUI with GPU Support
sudo docker run -d --gpus=all -p 7860:7860 ericwang2006/whisper-webui:faster-whisper
  1. CLI Usage
sudo docker run --rm \
--gpus=all \
-v ./.cache/whisper:/root/.cache/whisper \
-v ./.cache/huggingface:/root/.cache/huggingface \
-v ./:/app/data \
ericwang2006/whisper-webui:faster-whisper \
python3 cli.py --model large --auto_parallel True \
--vad silero-vad-skip-gaps \
--vad_max_merge_size 8.0 \
--vad_merge_window 1.0 \
--vad_padding 0.3 \
--language Chinese \
--whisper_implementation faster-whisper \
--compute_type float16 \
--output_dir /app/data /app/data/example.mp4

Cache Directories

The following directories are used for caching:

  • /root/.cache/whisper - Whisper model cache directory
  • /root/.cache/huggingface - Faster-Whisper model cache directory

These directories are mounted as volumes to persist downloaded models between container runs.

Additional Notes for Command Line Usage

  • To run the CLI in CPU mode, remove the --gpus=all parameter from the command.
  • The --language parameter can be used to specify the language of the audio input, which helps improve transcription accuracy.

Key Parameter Explanations

  1. --vad_max_merge_size – This is the most critical parameter
    • Setting it between 10.0-15.0 seconds limits the maximum length of a single subtitle segment.
    • If you want shorter subtitles, set it to 8.0 seconds or less.
  2. --vad_merge_window – Controls merge logic
    • Setting it to 1.5-2.0 seconds helps reduce over-merging of adjacent voice segments.
    • Smaller values produce more but shorter subtitle segments.
  3. --vad silero-vad-skip-gaps – Algorithm choice
    • This variant skips silent gaps compared to the basic silero-vad.
    • It helps split subtitles naturally at speech pauses.
  4. --vad_padding – Fine-tunes segment boundaries
    • Setting it from 0.3-0.5 seconds adds a small padding around each segment.
    • Helps avoid cutting off the beginning or end of words.

Adjusting Parameters Based on Content Type

  • Dialogue/Interview: --vad_max_merge_size 12.0 --vad_merge_window 2.0
  • Speech/Lecture: --vad_max_merge_size 20.0 --vad_merge_window 3.0
  • Fast Conversation: --vad_max_merge_size 8.0 --vad_merge_window 1.0

Features

  • GPU acceleration support
  • Voice Activity Detection (VAD) with configurable parameters
  • Support for multiple languages
  • Both standard Whisper and Faster-Whisper implementations
  • Web UI and CLI interfaces
  • Configurable model sizes and precision settings

Tag summary

Content type

Image

Digest

sha256:eab209eea

Size

4.2 GB

Last updated

about 1 year ago

docker pull ericwang2006/whisper-webui