ahmetoner/whisper-asr-webservice
Self-hosted Whisper REST API for transcription, translation, and subtitles
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
This is a self-hosted Python REST service built on FastAPI and Uvicorn. A client submits an audio or video file as multipart data, and PyAV decodes it inside the service process. The selected Whisper engine then runs inference locally. python-multipart, av, and numpy are declared dependencies; the runtime entrypoint is whisper-asr-webservice, and application code lives under app/.
The integration boundary is HTTP: the service exposes an OpenAI-compatible transcription endpoint under /v1 as well as the existing /asr route. Backend selection is a deployment setting, not a custom plugin protocol. ASR_ENGINE selects Faster Whisper, OpenAI Whisper, or WhisperX, while ASR_MODEL and ASR_DEVICE set the model and execution device.
Key Capabilities & Differentiators
The service transcribes speech in Whisper-supported languages, translates into English, and detects the input language with a confidence score. Outputs include plain text, JSON, WebVTT, SRT, and TSV. Supported model examples include tiny, base, small, large-v3, and turbo. The upload path accepts audio and video formats supported by the FFmpeg libraries used through PyAV.
Backend choice affects more than throughput. Faster Whisper is the default and supports voice activity detection and batched inference. OpenAI Whisper is the reference implementation. WhisperX provides word alignment and speaker diarization, with HF_TOKEN required for diarization. Word-level timing is available, but clients should verify the chosen engine, endpoint, and output format together before relying on specific timestamp or speaker fields.
Trade-offs & Limitations
Compared with a hosted Whisper API, this service keeps inference on infrastructure you control and can reuse clients that accept a custom OpenAI base URL. In return, you own model downloads, capacity planning, updates, and uptime. Compared with embedding Faster Whisper directly, a shared HTTP service simplifies integration across applications but adds file transport and another process to operate.
Capacity depends on the engine, model, input duration, and concurrency; the default base configuration is a useful starting point, not a production sizing estimate. MODEL_IDLE_TIMEOUT can reclaim memory between bursts, at the cost of reloading the model on a later request. Authentication is optional and unset by default. Treat the documented API as file-based transcription, not as a replacement for a streaming protocol.
Hardware & Deployment Guide
The CPU and NVIDIA GPU images support amd64 and arm64 and serve HTTP on port 9000. GPU containers require the NVIDIA Container Toolkit and can be launched with --gpus all using the latest-gpu image. Persist /root/.cache to reuse downloaded model files. The CPU Compose file builds from Dockerfile, sets ASR_MODEL=base, bind-mounts ./app, and uses a named cache volume. Running from source requires Python 3.12 or 3.13 and uv.
Version 1.11.0 added API key authentication, health checks, logging, and request limits. Version 2.0.0 added the OpenAI-compatible API and ARM64 GPU image, moved decoding to PyAV, and made Faster Whisper the default. It also changed /asr JSON output and subtitle defaults, so v1 integrations should regression-test their parsers. Version 2.0.1 fixed WhisperX startup in Docker by restoring the missing libgomp dependency.
/v1/audio/transcriptions plus the existing /asr endpoint.ASR_ENGINE switches among faster_whisper, openai_whisper, and whisperx; ASR_MODEL selects the model./root/.cache can be persisted for model downloads.X-API-Key authentication, health checks, request limits, and configurable idle model unloading.Teams that need to process recorded audio or video on their own infrastructure, share a transcription endpoint across applications, or migrate existing OpenAI audio clients to local inference.
Your product requires live bidirectional streaming, you do not want to operate model-serving infrastructure, or a single application can call Faster Whisper directly.
Quick Start & Installation
docker run -d -p 9000:9000 \ -e ASR_ENGINE=faster_whisper \ -e ASR_MODEL=base \ onerahmet/openai-whisper-asr-webservice:latest
Comparison vs. Top Voice, Vision & Video Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| whisper-asr-webservice ★ | 3.4k | — | Python | MIT | Self-hosted Whisper REST API for transcription, translation, and subtitles |
| WhisperLiveKit | 11.3k | +27 | Python | Apache-2.0 | Self-hosted streaming speech-to-text with pluggable ASR and speaker diarization |
| whisperX | 26.5k | +677 | Python | BSD-2-Clause | Batched Whisper with forced alignment for word timings and optional speaker labe |
| mlx-audio | 8.4k | +32 | Python | MIT | MLX inference SDK for local speech and audio pipelines on Apple Silicon |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/ahmetoner/whisper-asr-webservice.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about whisper-asr-webservice
How do I point an existing OpenAI speech client at this service?
http://<host>:9000/v1 and send a multipart file upload to /v1/audio/transcriptions. The example sends model=whisper-1, while the deployed engine and model are configured through ASR_ENGINE and ASR_MODEL. If authentication is enabled, make sure the client sends X-API-Key; also test the response formats your application consumes.How should I size CPU, RAM, and GPU capacity?
base as a CPU baseline, then measure peak RAM and processing time with representative files and concurrent uploads. For GPU deployment, measure peak VRAM with the actual model and features you intend to enable, including WhisperX alignment or diarization if needed. No fixed VRAM requirement is specified. Test both cold and warm requests if you configure idle unloading.Can I use this commercially and keep recordings in my own environment?
When is this a better fit than a hosted Whisper API or direct Faster Whisper integration?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy