WhisperLive real-time speech-to-text server. WebSocket streaming + OpenAI-compatible REST API.
10K+
GitHub: https://github.com/hwdsl2/docker-whisper-live
Part of the Self-Hosted AI Stack — deploy a complete self-hosted AI stack with a single command.
Docker image to run a WhisperLive real-time speech-to-text server, powered by faster-whisper. Provides WebSocket streaming for live audio transcription and an OpenAI-compatible REST API for file transcription. Based on Debian (python:3.12-slim). Designed to be simple, private, and self-hosted.
Features:
POST /v1/audio/transcriptions for file transcription; any app using the OpenAI Whisper API switches with a one-line changetiny, base, small, medium, large-v3, large-v3-turbo and morewhisper_live_manage):cuda image tag)WHISPERLIVE_LOCAL_ONLY)linux/amd64, linux/arm64📘 The Self-Hosted AI Builder’s Guide: $0.99/£0.99 ebook through Sept. 20 (US/UK). A practical guide to building, securing, and operating your own private AI stack.
Also available:
| docker-whisper | docker-whisper-live | |
|---|---|---|
| Use case | Transcribe complete audio files | Live microphone / real-time audio streaming |
| Protocol | HTTP REST | WebSocket (streaming) + HTTP REST |
| Latency | Full file, then response | Near-real-time, word by word |
| Best for | Meeting recordings, uploaded audio | Browser capture, RTSP streams, live captions |
| Image size | ~190 MB (~3.1 GB for :cuda) | ~750 MB (~4.5 GB for :cuda) |
Use this command to set up a WhisperLive server:
docker run \
--name whisper-live \
--restart=always \
-v whisper-live-data:/var/lib/whisper-live \
-p 9090:9090 \
-p 8000:8000 \
-d hwdsl2/whisper-live-server
If you have an NVIDIA GPU, use the :cuda image for hardware-accelerated inference:
docker run \
--name whisper-live \
--restart=always \
--gpus=all \
-v whisper-live-data:/var/lib/whisper-live \
-p 9090:9090 \
-p 8000:8000 \
-d hwdsl2/whisper-live-server:cuda
Requirements: NVIDIA GPU, NVIDIA driver 575.57.08+ (Linux) or 576.57+ (Windows), and the NVIDIA Container Toolkit installed on the host. The :cuda image is linux/amd64 only.
Note: For internet-facing deployments, use a reverse proxy to add HTTPS. Also replace -p 9090:9090 -p 8000:8000 with -p 127.0.0.1:9090:9090 -p 127.0.0.1:8000:8000 in the docker run command above, to prevent direct access to the unencrypted ports.
The Whisper base model (~145 MB) is downloaded and cached on first client connection. Check the logs to confirm the server is ready:
docker logs whisper-live
Once you see "WhisperLive real-time transcription server is ready":
Fresh persistent installations enable API-key authentication automatically. Retrieve the key:
API_KEY=$(docker exec whisper-live whisper_live_manage --getkey)
Connect a real-time WebSocket client:
ws://your_server_ip:9090/?token=YOUR_API_KEY
Or transcribe a file via the REST API:
curl http://your_server_ip:8000/v1/audio/transcriptions \
-H "Authorization: Bearer $API_KEY" \
-F [email protected] \
-F model=whisper-1
Response:
{"text": "Your transcribed text appears here."}
Tip: Need a sample audio file to test the REST API? Download this English speech sample (WAV, MIT License) from the Azure Samples repository:
curl -L -o sample_speech.wav \
"https://github.com/Azure-Samples/cognitive-services-speech-sdk/raw/master/sampledata/audiofiles/katiesteve.wav"
curl http://your_server_ip:8000/v1/audio/transcriptions \
-F file=@sample_speech.wav \
-F model=whisper-1
amd64 (x86_64), arm64 (e.g. Raspberry Pi 4/5, AWS Graviton)base model (see model table)WHISPERLIVE_LOCAL_ONLY=true with pre-cached models.For GPU acceleration (:cuda image):
:cuda image supports linux/amd64 onlyFor internet-facing deployments, see Using a reverse proxy to add HTTPS.
Get the trusted build from the Docker Hub registry:
docker pull hwdsl2/whisper-live-server
For NVIDIA GPU acceleration, pull the :cuda tag instead:
docker pull hwdsl2/whisper-live-server:cuda
Alternatively, you may download from Quay.io:
docker pull quay.io/hwdsl2/whisper-live-server
docker image tag quay.io/hwdsl2/whisper-live-server hwdsl2/whisper-live-server
Supported platforms: linux/amd64 and linux/arm64. The :cuda tag supports linux/amd64 only.
All variables are optional. Fresh installs with a mounted /var/lib/whisper-live volume auto-generate an API key. Existing installs without a key remain open for backward compatibility.
This Docker image uses the following variables, that can be declared in an env file (see example):
| Variable | Description | Default |
|---|---|---|
WHISPERLIVE_MODEL | Whisper model to use. See model table for options. | base |
WHISPERLIVE_LANGUAGE | Default transcription language. BCP-47 code (e.g. en, fr, de, zh, ja) or auto to autodetect. | auto |
WHISPERLIVE_PORT | WebSocket port for real-time streaming clients (1–65535). | 9090 |
WHISPERLIVE_REST_PORT | HTTP port for the OpenAI-compatible REST API (1–65535). | 8000 |
WHISPERLIVE_MAX_CLIENTS | Maximum number of simultaneous WebSocket client connections. | 4 |
WHISPERLIVE_MAX_CONNECTION_TIME | Maximum WebSocket connection duration in seconds. Clients exceeding this are disconnected. | 600 |
WHISPERLIVE_USE_VAD | Voice Activity Detection default. For the faster_whisper backend, VAD is controlled per WebSocket client via the connection handshake use_vad field. | true |
WHISPERLIVE_THREADS | CPU threads for inference. Set to the number of physical cores for best latency. | 2 |
WHISPERLIVE_LOG_LEVEL | Log level: DEBUG, INFO, WARNING, ERROR, CRITICAL. | INFO |
WHISPERLIVE_API_KEY | Optional API key. Fresh persistent installs auto-generate one. REST requests must include Authorization: Bearer <key>; WebSocket clients can use ?token=<key>. Set explicitly empty to disable authentication. | Auto-generated for fresh persistent installs |
WHISPERLIVE_LOCAL_ONLY | When set to any non-empty value (e.g. true), disables all HuggingFace model downloads. For offline or air-gapped deployments with pre-cached models. | (not set) |
WHISPERLIVE_DISABLE_USAGE_COUNTS | Set to 1 to disable anonymous aggregate usage counts. | (not set) |
Note: In your env file, you may enclose values in single quotes, e.g. VAR='value'. Do not add spaces around =. If you change WHISPERLIVE_PORT or WHISPERLIVE_REST_PORT, update the -p flags in the docker run command accordingly.
Example using an env file:
cp whisper-live.env.example whisper-live.env
# Edit whisper-live.env with your settings, then:
docker run \
--name whisper-live \
--restart=always \
-v whisper-live-data:/var/lib/whisper-live \
-v ./whisper-live.env:/whisper-live.env:ro \
-p 9090:9090 \
-p 8000:8000 \
-d hwdsl2/whisper-live-server
The env file is bind-mounted into the container, so changes are picked up on every restart without recreating the container.
--env-filedocker run \
--name whisper-live \
--restart=always \
-v whisper-live-data:/var/lib/whisper-live \
-p 9090:9090 \
-p 8000:8000 \
--env-file=whisper-live.env \
-d hwdsl2/whisper-live-server
cp whisper-live.env.example whisper-live.env
# Edit whisper-live.env as needed, then:
docker compose up -d
docker logs whisper-live
Example docker-compose.yml (already included):
services:
whisper-live:
image: hwdsl2/whisper-live-server
container_name: whisper-live
restart: always
ports:
- "9090:9090/tcp" # WebSocket — for a host-based reverse proxy, change to "127.0.0.1:9090:9090/tcp"
- "8000:8000/tcp" # REST API — for a host-based reverse proxy, change to "127.0.0.1:8000:8000/tcp"
volumes:
- whisper-live-data:/var/lib/whisper-live
- ./whisper-live.env:/whisper-live.env:ro
volumes:
whisper-live-data:
name: whisper-live-data
Note: For internet-facing deployments, use a reverse proxy to add HTTPS. Also change "9090:9090/tcp" and "8000:8000/tcp" to their 127.0.0.1: equivalents in docker-compose.yml.
A separate docker-compose.cuda.yml is provided for GPU deployments:
cp whisper-live.env.example whisper-live.env
# Edit whisper-live.env as needed, then:
docker compose -f docker-compose.cuda.yml up -d
docker logs whisper-live
Example docker-compose.cuda.yml (already included):
services:
whisper-live:
image: hwdsl2/whisper-live-server:cuda
container_name: whisper-live
restart: always
ports:
- "9090:9090/tcp" # WebSocket — for a host-based reverse proxy, change to "127.0.0.1:9090:9090/tcp"
- "8000:8000/tcp" # REST API — for a host-based reverse proxy, change to "127.0.0.1:8000:8000/tcp"
volumes:
- whisper-live-data:/var/lib/whisper-live
- ./whisper-live.env:/whisper-live.env:ro
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
volumes:
whisper-live-data:
name: whisper-live-data
See WebSocket streaming.
The REST API at port 8000 is compatible with OpenAI's audio transcription endpoint. Any application already calling https://api.openai.com/v1/audio/transcriptions can switch to self-hosted by setting:
OPENAI_BASE_URL=http://your_server_ip:8000
POST /v1/audio/transcriptions
Content-Type: multipart/form-data
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
file | file | ✅ | Audio file. Supported formats: mp3, mp4, m4a, wav, webm, ogg, flac and all other formats supported by ffmpeg. |
model | string | ✅ | Pass whisper-1 (value is accepted but ignored; the active WHISPERLIVE_MODEL is always used). |
language | string | — | BCP-47 language code (e.g. en, fr, zh). If omitted, language is autodetected. |
Example:
curl http://your_server_ip:8000/v1/audio/transcriptions \
-F [email protected] \
-F model=whisper-1 \
-F language=en
Response:
{"text": "Your transcribed text appears here."}
An interactive Swagger UI is available at:
http://your_server_ip:8000/docs
All server data is stored in the Docker volume (/var/lib/whisper-live inside the container):
/var/lib/whisper-live/
├── models--Systran--faster-whisper-*/ # Cached Whisper model files (downloaded from HuggingFace)
├── .ws_port # Active WebSocket port (used by whisper_live_manage)
├── .rest_port # Active REST API port (used by whisper_live_manage)
├── .model # Active model name (used by whisper_live_manage)
└── .server_addr # Cached server IP (used by whisper_live_manage)
Back up the Docker volume to preserve downloaded models. Models are large (145 MB – 3 GB) and can take several minutes to download on first client connection; preserving the volume avoids re-downloading on container recreation.
Tip: The /var/lib/whisper-live volume uses the same HuggingFace cache layout as docker-whisper's /var/lib/whisper volume. If you have already downloaded a model with docker-whisper, you can bind-mount the same volume directory to avoid re-downloading.
Use whisper_live_manage inside the running container to inspect and manage the server.
Show server info:
docker exec whisper-live whisper_live_manage --showinfo
List available models:
docker exec whisper-live whisper_live_manage --listmodels
Pre-download a model:
docker exec whisper-live whisper_live_manage --downloadmodel large-v3-turbo
To change the active model:
(Optional but recommended) Pre-download the new model while the server is running:
docker exec whisper-live whisper_live_manage --downloadmodel large-v3-turbo
Update WHISPERLIVE_MODEL in your whisper-live.env file (or add -e WHISPERLIVE_MODEL=large-v3-turbo to your docker run command).
Restart the container:
docker restart whisper-live
Available models:
| Model | Disk | RAM (approx) | Notes |
|---|---|---|---|
tiny | ~75 MB | ~250 MB | Fastest; lower accuracy |
tiny.en | ~75 MB | ~250 MB | English-only |
base | ~145 MB | ~700 MB | Good balance — default |
base.en | ~145 MB | ~700 MB | English-only |
small | ~465 MB | ~1.5 GB | Better accuracy |
small.en | ~465 MB | ~1.5 GB | English-only |
medium | ~1.5 GB | ~5 GB | High accuracy |
medium.en | ~1.5 GB | ~5 GB | English-only |
large-v1 | ~3 GB | ~10 GB | Older large model |
large-v2 | ~3 GB | ~10 GB | Very high accuracy |
large-v3 | ~3 GB | ~10 GB | Best accuracy |
large-v3-turbo | ~1.6 GB | ~6 GB | Fast + high accuracy ⭐ |
turbo | ~1.6 GB | ~6 GB | Alias for large-v3-turbo |
Tip:
large-v3-turbooffers accuracy close tolarge-v3at roughly half the resource cost. It is the recommended upgrade path frombasefor most production deployments.
RAM figures are approximate and reflect INT8 quantization (default). Models are cached in the /var/lib/whisper-live Docker volume and only downloaded once.
For internet-facing deployments, place a reverse proxy in front of the server to handle HTTPS and WSS (secure WebSocket) termination.
Use one of the following addresses to reach the container from your reverse proxy:
whisper-live:9090 / whisper-live:8000 — if your reverse proxy runs as a container in the same Docker network.127.0.0.1:9090 / 127.0.0.1:8000 — if your reverse proxy runs on the host and the ports are published.Example with Caddy (Docker image) (automatic TLS, WebSocket proxying in the same Docker network):
Caddyfile:
whisper-live.example.com {
# WebSocket streaming (wss://)
handle /ws* {
reverse_proxy whisper-live:9090
}
# REST API (https://)
reverse_proxy whisper-live:8000
}
Example with nginx (reverse proxy on the host):
server {
listen 443 ssl;
server_name whisper-live.example.com;
ssl_certificate /path/to/cert.pem;
ssl_certificate_key /path/to/key.pem;
# REST API
location /v1/ {
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 300s;
}
# WebSocket streaming
location / {
proxy_pass http://127.0.0.1:9090;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_read_timeout 600s;
}
}
Important: WebSocket proxying requires
proxy_http_version 1.1and theUpgrade/Connectionheaders. Without these, real-time streaming will not work through nginx.
The server supports native API-key authentication via WHISPERLIVE_API_KEY. For internet-facing deployments, you can also add Bearer token or basic auth at the reverse proxy layer as defense in depth. Example with Caddy (basicauth protects the REST API):
whisper-live.example.com {
handle /v1/* {
basicauth {
user $2a$14$<bcrypt-hash-of-password>
}
reverse_proxy whisper-live:8000
}
handle /ws* {
reverse_proxy whisper-live:9090
}
reverse_proxy whisper-live:8000
}
Example with nginx (auth_basic on the REST API location):
location /v1/ {
auth_basic "WhisperLive";
auth_basic_user_file /etc/nginx/.htpasswd;
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $host;
proxy_read_timeout 300s;
}
Non-browser WebSocket clients can authenticate with an Authorization header. Because the browser WebSocket API cannot set arbitrary headers, browser clients can use ?token=<key>. For defense in depth, keep port 9090 bound to 127.0.0.1 behind the reverse proxy.
To update the Docker image and container, first download the latest version:
docker pull hwdsl2/whisper-live-server
If the Docker image is already up to date, you should see:
Status: Image is up to date for hwdsl2/whisper-live-server:latest
Otherwise, it will download the latest version. Remove and re-create the container:
docker rm -f whisper-live
# Then re-run the docker run command from Quick start with the same volumes and ports.
Your downloaded models are preserved in the whisper-live-data volume.
WhisperLive can be used as the real-time speech-to-text service in a broader self-hosted AI setup.
For full and lightweight Docker Compose stacks, manual docker run examples, and voice/RAG/MCP pipeline examples with Kokoro, Embeddings, LiteLLM, Ollama, Docling, and MCP Gateway, see Self-Hosted AI Stack.
See Usage counts.
python:3.12-slim (Debian)/opt/venv)websockets library/var/lib/whisper-live (Docker volume)Note: The software components inside the pre-built image (such as WhisperLive, faster-whisper, PyTorch, and their dependencies) are under the respective licenses chosen by their respective copyright holders. As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.
Copyright (C) 2026 Lin Song
This work is licensed under the MIT License.
WhisperLive is Copyright (C) Vineet Suryan, Collabora Ltd., and is distributed under the MIT License.
faster-whisper is Copyright (C) SYSTRAN, and is distributed under the MIT License.
This project is an independent Docker setup and is not affiliated with, endorsed by, or sponsored by OpenAI, Collabora, or SYSTRAN.
Content type
Image
Digest
sha256:34ddd71d9…
Size
804.4 MB
Last updated
13 days ago
docker pull hwdsl2/whisper-live-server