github ahmetoner/whisper-asr-webservice v1.11.0

one hour ago

This release upgrades the engines to PyTorch 2.8 and WhisperX 3.8.6, fixes long-standing bugs in the WhisperX engine and in model unloading, adds API key authentication, health checks, logging and request limits, and makes the Docker images smaller and considerably safer.

Before you upgrade

  • WhisperX speaker diarization now uses pyannote/speaker-diarization-community-1. Accept its user conditions on Hugging Face with the account that owns HF_TOKEN, otherwise diarization fails to load.
  • GPU image: PyTorch now targets CUDA 12.8, which adds support for RTX 50xx / Blackwell GPUs. Make sure your NVIDIA driver supports the CUDA version of the image.
  • Running from source now requires Python 3.12 or 3.13 and Poetry 2.x. The Docker images are not affected.
  • Startup: the service now accepts connections immediately and loads the model in the background. /health returns 503 with {"status": "loading"} until the model is ready, and requests sent meanwhile wait for it.
  • All new settings are optional, and their defaults keep the previous behavior.

Docker images

Tag Platforms
v1.11.0, latest linux/amd64, linux/arm64
v1.11.0-gpu, latest-gpu linux/amd64
v1.11.0-amd64, v1.11.0-arm64, v1.11.0-gpu-amd64 single architecture
docker pull onerahmet/openai-whisper-asr-webservice:v1.11.0
docker pull onerahmet/openai-whisper-asr-webservice:v1.11.0-gpu

Highlights

  • API key authentication with API_KEY; the documentation and /health stay public.
  • /health endpoint and a Docker HEALTHCHECK.
  • Logging with timestamps and LOG_LEVEL: each request is logged with its duration, and LOG_LEVEL=DEBUG adds decoding times and engine options.
  • Model unloading: MODEL_IDLE_TIMEOUT works reliably again, and the new MODEL_UNLOAD_AFTER_REQUEST frees memory right after each request.
  • Request limits: MAX_UPLOAD_SIZE_MB and MAX_PENDING_REQUESTS protect shared servers from oversized uploads and request pile-ups.
  • Decoding options: ASR_BEAM_SIZE, ASR_BATCH_SIZE and ASR_VAD_FILTER.
  • Non-root containers with --user and XDG_CACHE_HOME.
  • Smaller, safer images: a slim Debian base for the CPU image, a multi-stage build without Poetry or download caches, FFmpeg n9.1, and every image scanned with Trivy before it is published.
  • New documentation with an API reference, a complete configuration table and a request flow diagram: https://ahmetoner.github.io/whisper-asr-webservice

Added

  • API_KEY environment variable for optional API key authentication
  • /health endpoint for container health checks, public even when API_KEY is set
  • Docker HEALTHCHECK that uses the /health endpoint
  • LOG_LEVEL environment variable and timestamped logs: startup configuration, model loading and every request with its duration at INFO, and decoding times and engine options at DEBUG
  • ASR_BEAM_SIZE, ASR_BATCH_SIZE and ASR_VAD_FILTER environment variables
  • MODEL_UNLOAD_AFTER_REQUEST environment variable to unload the model as soon as each request finishes
  • MAX_UPLOAD_SIZE_MB and MAX_PENDING_REQUESTS limits that reject oversized uploads (413) and excess requests (503); both are off by default
  • Docker images can run as a non-root user (--user) with XDG_CACHE_HOME pointing to a writable cache directory; ASR_MODEL_PATH now defaults to $XDG_CACHE_HOME/whisper
  • OCI labels on the Docker images: title, description, version, revision, creation time, license, documentation and source URLs
  • Per-architecture Docker image tags (<version>-amd64, <version>-arm64, <version>-gpu-amd64)
  • Request flow diagram in the README and the development guide

Changed

  • The service starts accepting connections immediately and loads the model in the background
  • Upgraded PyTorch to v2.8.0 (CUDA builds use CUDA 12.8), whisperx to v3.8.6, pyannote-audio to v4.1.1, fastapi to v0.165.0, uvicorn to v0.54.0, python-multipart to v0.0.34, tqdm to v4.70.1, llvmlite to v0.50.0 and numba to v0.68.1
  • Python requirement is now >=3.12,<3.14, and Poetry v2.5.2 is used
  • WhisperX diarization uses pyannote/speaker-diarization-community-1
  • Only the selected ASR engine is imported at startup, reducing startup time and memory use
  • Docker images use the FFmpeg n9.1 build layer and include the FFmpeg license (LGPL v2.1+) at /usr/local/share/doc/ffmpeg
  • The CPU Docker image is based on python:3.12-slim-bookworm
  • Docker images are built in a separate stage and no longer contain Poetry, development dependencies or download caches, making them several GB smaller
  • arm64 images are built on native runners instead of under emulation
  • Rewrote the README and the documentation

Fixed

  • WhisperX crash loop at startup (Weights only load failed) caused by lightning 2.6 with pyannote-audio 3.x
  • Model failing to reload after MODEL_IDLE_TIMEOUT unloaded it, especially with WhisperX
  • Model being unloaded right after a request that took longer than MODEL_IDLE_TIMEOUT
  • initial_prompt causing HTTP 500 with the WhisperX engine
  • WhisperX diarization ignoring min_speakers and max_speakers
  • /detect-language returning the confidence of the wrong language with the openai_whisper engine
  • Empty transcripts for M4A/MP4/MOV files that store their index at the end of the file
  • Undecodable, empty or malformed raw (encode=false) uploads now return HTTP 400 instead of 500
  • /asr responses now use a Content-Type matching the requested output format
  • Swagger UI showing a text field instead of a file picker for audio_file in Docker images
  • Server becoming unresponsive, including /docs, while a transcription is running
  • Missing contact URL in the OpenAPI metadata

Security

Full changelog: v1.10.0...v1.11.0

Don't miss a new whisper-asr-webservice release

NewReleases is sending notifications on new releases.