首次启动会下载所选模型,建议挂载 -v $PWD/cache:/root/.cache/ 复用缓存;GPU 需用 latest-gpu 镜像并配 --gpus all;说话人分离仅在 ASR_ENGINE=whisperx 时可用。
whisper-asr-webservice
ahmetonerMIT活跃维护把 OpenAI Whisper 封装成开箱即用的 Docker 语音识别 Web 服务,上传音频即可通过 API 拿到转写文本,省去自己搭推理服务的麻烦。
OpenAI Whisper ASR Webservice API
docker run -d -p 9000:9000 -e ASR_MODEL=base -e ASR_ENGINE=openai_whisper onerahmet/openai-whisper-asr-webservice:latest提供 CPU 与 GPU 两个镜像,GPU 版需 --gpus all 运行;可用 ASR_DEVICE 选 cuda 或 cpu。README 未给出具体显存要求与 GPU 型号。
把 Whisper 语音识别封装成 REST API 的 Docker 服务,开箱即用
把 OpenAI Whisper 封装成开箱即用的 Docker 语音识别 Web 服务,上传音频即可通过 API 拿到转写文本,省去自己搭推理服务的麻烦。
核心能力
- 支持 OpenAI Whisper、Faster Whisper、WhisperX 三种引擎
- 输出 text、JSON、VTT、SRT、TSV 多种格式
- 支持词级时间戳与 VAD 语音活动过滤
- WhisperX 引擎可做说话人分离
- 集成 FFmpeg 兼容多种音视频格式
容易踩的坑
- v1.10.0最新正式版2026-08-09 · 2026-08-09 20:35 UTC
What's Changed
- Add image source label to dockerfiles by @wuast94 in https://github.com/ahmetoner/whisper-asr-webservice/pull/319
- Updates by @ahmetoner in https://github.com/ahmetoner/whisper-asr-webservice/pull/379
- Updates by @ahmetoner in https://github.com/ahmetoner/whisper-asr-webservice/pull/380
- Upgrade CUDA image to 12.9.2-cudnn-runtime-ubuntu24.04 by @ahmetoner in https://github.com/ahmetoner/whisper-asr-webservice/pull/381
New Contributors
- @wuast94 made their first contribution in https://github.com/ahmetoner/whisper-asr-webservice/pull/319
Full Changelog: https://github.com/ahmetoner/whisper-asr-webservice/compare/v1.9.1...v1.10.0
- v1.9.12025-07-01 · 2025-07-01 19:14 UTC
查看更新说明
Fixed
- Fixed Whisperx diarization pipeline initialization
- Fixed Whisperx language detection
What's Changed
- Release 1.9.0 by @ahmetoner in https://github.com/ahmetoner/whisper-asr-webservice/pull/316
- Fix whisperx diarization pipeline init and language detection by @ahmetoner in https://github.com/ahmetoner/whisper-asr-webservice/pull/317
Full Changelog: https://github.com/ahmetoner/whisper-asr-webservice/compare/v1.9.0...v1.9.1
- v1.9.02025-06-29 · 2025-06-29 01:02 UTC
查看更新说明
Discord Server
🎉 Join our Discord Community! Connect with other users, get help, and stay updated on the latest features: https://discord.gg/4Q5YVrePzZ
Changed
- Upgraded
- Poetry to v2.1.3
- openai/whisper@v20250625
- SYSTRAN/faster-whisper to v1.1.1
- whisperX@v3.4.2
- torch to v2.7.1
- torchaudio to v2.7.1
- numpy to v2.2.6
- fastapi to v0.115.14
- uvicorn to v0.35.0
- numba to v0.61.2
What's Changed
- Upgrade dependencies by @ahmetoner in https://github.com/ahmetoner/whisper-asr-webservice/pull/315
Full Changelog: https://github.com/ahmetoner/whisper-asr-webservice/compare/v1.8.2...v1.9.0
- Upgraded
- v1.8.22025-02-18 · 2025-02-18 00:59 UTC
查看更新说明
What's Changed
- Reduced GPU image size by using
nvidia/cuda:12.6.3-base-ubuntu22.04in https://github.com/ahmetoner/whisper-asr-webservice/pull/287
Full Changelog: https://github.com/ahmetoner/whisper-asr-webservice/compare/v1.8.1...v1.8.2
- Reduced GPU image size by using
- v1.8.12025-02-18 · 2025-02-18 00:05 UTC
查看更新说明
What's Changed
Fixed
- Fix issues with Torch CUDA and cuDNN, fixes #283 and #284 by @ahmetoner in https://github.com/ahmetoner/whisper-asr-webservice/pull/285
- Updated Torch and Torchaudio dependencies for multi-architecture support
Full Changelog: https://github.com/ahmetoner/whisper-asr-webservice/compare/v1.8.0...v1.8.1
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
Whisper ASR Box
Whisper ASR Box is a general-purpose speech recognition toolkit. Whisper Models are trained on a large dataset of diverse audio and is also a multitask model that can perform multilingual speech recognition as well as speech translation and language identification.
🎉 Join our Discord Community! Connect with other users, get help, and stay updated on the latest features: https://discord.gg/4Q5YVrePzZ
Features
Current release (v1.10.0) supports following whisper models:
Quick Usage
CPU
docker run -d -p 9000:9000 \
-e ASR_MODEL=base \
-e ASR_ENGINE=openai_whisper \
onerahmet/openai-whisper-asr-webservice:latest
GPU
docker run -d --gpus all -p 9000:9000 \
-e ASR_MODEL=base \
-e ASR_ENGINE=openai_whisper \
onerahmet/openai-whisper-asr-webservice:latest-gpu
Cache
To reduce container startup time by avoiding repeated downloads, you can persist the cache directory:
docker run -d -p 9000:9000 \
-v $PWD/cache:/root/.cache/ \
onerahmet/openai-whisper-asr-webservice:latest
Key Features
- Multiple ASR engines support (OpenAI Whisper, Faster Whisper, WhisperX)
- Multiple output formats (text, JSON, VTT, SRT, TSV)
- Word-level timestamps support
- Voice activity detection (VAD) filtering
- Speaker diarization (with WhisperX)
- FFmpeg integration for broad audio/video format support
- GPU acceleration support
- Configurable model loading/unloading
- REST API with Swagger documentation
Environment Variables
Key configuration options:
ASR_ENGINE: Engine selection (openai_whisper, faster_whisper, whisperx)ASR_MODEL: Model selection (tiny, base, small, medium, large-v3, etc.)ASR_MODEL_PATH: Custom path to store/load modelsASR_DEVICE: Device selection (cuda, cpu)MODEL_IDLE_TIMEOUT: Timeout for model unloading
Documentation
For complete documentation, visit: https://ahmetoner.github.io/whisper-asr-webservice
Development
# 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
After starting the service, visit http://localhost:9000 or http://0.0.0.0:9000 in your browser to access the Swagger UI documentation and try out the API endpoints.