Supported Whisper Engines and Models
mainThe current release (v1.9.1) supports the following Whisper implementations:
openai/whisper@ v20250625SYSTRAN/faster-whisper@ v1.1.1whisperX@ v3.4.2
repository·main·Indexed 25 days ago
https://github.com/ahmetoner/whisper-asr-webserviceA general-purpose speech recognition webservice providing a REST API for multilingual speech recognition, translation, and language identification. It supports multiple engines including openai_whisper, faster_whisper, and whisperx, and offers features such as speaker diarization, word-level timestamps, and various output formats (text, json, vtt, srt, tsv). The service can be deployed via Docker or Docker Compose on both CPU and GPU.
The current release (v1.9.1) supports the following Whisper implementations:
openai/whisper @ v20250625SYSTRAN/faster-whisper @ v1.1.1whisperX @ v3.4.2http://localhost:9000/docs to explore and test the API endpoints.To run the service on a CPU, use the latest Docker image. You can specify the model and engine using environment variables.
docker run -d -p 9000:9000 \
-e ASR_MODEL=base \
-e ASR_ENGINE=openai_whisper \
onerahmet/openai-whisper-asr-webservice:latestBy default, poetry install installs the CPU version of PyTorch. If you require GPU support, you must manually install the appropriate CUDA version of PyTorch.
Example for CUDA 12.1 (adjust the index URL and version as needed for your specific CUDA version, e.g., 11.8):
pip3 install torch==2.6.0 --index-url https://download.pytorch.org/whl/cu121To run the service on CPU (including macOS), pull the latest image and run the container. Note that on macOS, GPU passthrough is not supported due to Docker's Linux VM architecture; use the CPU image instead. The :latest tag supports both amd64 and arm64 architectures.
docker pull onerahmet/openai-whisper-asr-webservice:latest
docker run -d -p 9000:9000 \
-e ASR_MODEL=base \
-e ASR_ENGINE=openai_whisper \
onerahmet/openai-whisper-asr-webservice:latestUse Dockerfile.gpu to build the GPU-enabled image. When running the container, you must use the --gpus all flag to grant access to the host's GPU.
# Build Image
docker build -f Dockerfile.gpu -t whisper-asr-webservice-gpu .
# Run Container
docker run -d --gpus all -p 9000:9000 whisper-asr-webservice-gpu
# Run Container with a specific model (e.g., base)
docker run -d --gpus all -p 9000:9000 -e ASR_MODEL=base whisper-asr-webservice-gpuUse the standard Dockerfile to build and run the CPU version of the service.
# Build Image
docker build -t whisper-asr-webservice .
# Run Container
docker run -d -p 9000:9000 whisper-asr-webservice
# Run Container with a specific model (e.g., base)
docker run -d -p 9000:9000 -e ASR_MODEL=base whisper-asr-webserviceTo package the project as a .whl file, use the Poetry build command.
poetry buildhttp://localhost:9000 or http://0.0.0.0:9000.To run the Whisper ASR Web Service on a CPU-only environment, use the following Docker command. This maps port 9000 and sets the model to base using the openai_whisper engine.
docker run -d -p 9000:9000 -e ASR_MODEL=base -e ASR_ENGINE=openai_whisper onerahmet/openai-whisper-asr-webservice:latestTo develop locally, install poetry, install the appropriate dependencies (CPU or CUDA), and run the service using poetry run.
# Install poetry v2.X
pip3 install poetry
# Install dependencies for cpu
poetry install --extras cpu
# Install dependencies for cuda
poetry install --extras cuda
# Run service
poetry run whisper-asr-webservice --host 0.0.0.0 --port 9000