RepositoryPython
Quantatirsk

Quantatirsk/AsrServe

Self-hosted realtime and offline ASR with SOTA open models, speaker diarization and an OpenAI-compatible API. GPU, CPU, macOS Apple Silicon.

364stars
56forks
4issues
0views

AsrServe

Ready-to-use Local Speech Recognition API Service

Self-hosted realtime and offline speech recognition. AsrServe always ships state-of-the-art open models on the most efficient inference path available, and treats recognition quality as a first-class citizen.


Static Badge Static Badge Static Badge Static Badge

Live Demo Site

Demo

https://github.com/user-attachments/assets/ca6ed8ca-033d-4c58-85bb-2016d66151ea

Watch or download the original video

Contact Author

WeChat QR code

Release 1.0.4

v1.0.4 replaces the whole model stack on both the backend and the browser client. In our own tests against v1.0.3, recognition accuracy improved by about 20% and end-to-end efficiency by about 40%.

Breaking changes:

  • Project rename: qwen3-asr is now AsrServe. The GitHub repository, Python package and Docker images (quantatrisk/asrserve) use the new name; old GitHub URLs redirect automatically.
  • ASR model: Qwen3-ASR 1.7B/0.6B is replaced by Confucius4-R2T2. Offline and realtime share one R2T2 engine (vLLM on CUDA, vendored Rust on CPU); the model request field no longer switches models.
  • Speaker diarization: CAM++ is replaced by Nemotron-3-Diarization (up to 8 speakers). Realtime streams now also carry per-utterance speaker labels.
  • Removed models: FSMN VAD, the three CAM++ models and the Qwen3-ASR checkpoints are gone. Nemotron speech activity drives offline segmentation. ModelScope and FunASR are no longer dependencies; all models come from Hugging Face at pinned revisions.
  • Removed API: the Alibaba Cloud compatible REST API (/stream/v1/asr*) is removed. Use the OpenAI-compatible /v1/audio/transcriptions and the native /v1/stream WebSocket.
  • Deployment: images are published on Docker Hub as quantatrisk/asrserve:gpu (amd64), :cpu (amd64/arm64) and :ascend (arm64, Ascend 910B branch), plus 1.0.4-* version tags; build.sh builds from source. Compose files are compose.yml (GPU) and compose.cpu.yml (CPU) and no longer build. The only mount is ./models. docker-compose*.yml, deploy/prepare.sh and the model export option are removed. The old quantatrisk/qwen3-asr Docker Hub repository is no longer updated.
  • Runtime: the CUDA image moves to CUDA 13.0 and vLLM 0.30; the service listens on port 17003.

Older release notes: GitHub Releases.

Features

  • SOTA models, quality first: Confucius4-R2T2 recognition, Nemotron speaker diarization and Qwen3-ForcedAligner word timestamps today; the stack moves whenever a better open model appears
  • First-class macOS support: runs natively on Apple Silicon through a bundled Rust inference backend, no Docker or GPU required
  • Runs anywhere else too: NVIDIA GPU (vLLM) and Linux CPU (amd64/arm64)
  • Realtime and offline in one service, sharing one set of R2T2 weights
  • Speaker diarization for files and live streams via Nemotron
  • Word timestamps via Qwen3-ForcedAligner
  • OpenAI compatible /v1/audio/transcriptions, works with the OpenAI SDK
  • Browser recording page at /realtime

Quick Start

docker compose up -d                        # GPU: quantatrisk/asrserve:gpu
docker compose -f compose.cpu.yml up -d     # CPU: quantatrisk/asrserve:cpu (amd64/arm64)

Images are pulled from Docker Hub on first start; upgrade with docker compose pull && docker compose up -d. To build from source, run ./build.sh (CPU: TARGET=cpu ./build.sh). Ascend 910B lives on the ascend-910b branch.

On macOS, run natively instead (see Deployment):

uv sync --frozen && ./scripts/build-rust.sh
HF_HOME="$PWD/models/huggingface" uv run --no-sync python start.py   # http://localhost:8000

The first start downloads the pinned models into ./models. Default URL: http://localhost:17003 (recording page /realtime, API docs /docs, health /health).

.env is optional; copy .env.example and uncomment what you need (API key, offline mode, GPU memory, CPU threads).

For offline hosts, pre-download on a networked machine, copy the repository including models/, and set HF_HUB_OFFLINE=1:

./scripts/prepare-models.sh                                   # uses the :gpu image, no GPU needed
IMAGE=quantatrisk/asrserve:cpu ./scripts/prepare-models.sh   # or the :cpu image

File Transcription

curl http://localhost:17003/v1/audio/transcriptions \
  -F file=@recording.wav \
  -F model=confucius4-r2t2 \
  -F response_format=verbose_json \
  -F enable_speaker_diarization=true \
  -F word_timestamps=true

With API_KEY set, add Authorization: Bearer <API_KEY>. Speaker paragraphs follow the main speaker; raw overlapping activity is returned in speaker_segments.

Realtime Transcription

Connect to ws://localhost:17003/v1/stream and send 16 kHz mono int16 PCM. See the realtime protocol.

Documentation

Acknowledgements

Similar Projects

Discover other similar projects and AI models.

Modelautomatic-speech-recognition
argmaxinc/whisperkit-coreml

WhisperKit Repo WhisperKit is part of Argmax OSS, an On-device Speech AI SDK for Apple Silicon: https://github.com/argmaxinc/argmax-oss-swift Paper Check out the WhisperKit paper and presentation from ICML 2025: https://icml.cc/virtual/2025/47854 Pr...

♥0
109.1M
Aug 19, 2026
RepositoryPython
m-bain/whisperX

WhisperX: Automatic Speech Recognition with Word-level Timestamps (& Diarization)

26.4k
Nov 21, 2026
RepositoryPython
modelscope/FunASR

Open-source speech recognition toolkit for training, inference, streaming ASR, VAD, punctuation, speaker diarization pipelines, and OpenAI-compatible/MCP serving.

21.2k
Nov 27, 2026
RepositoryPython
NVIDIA-NeMo/Speech

A scalable generative AI framework built for researchers and developers working on Large Language Models, Multimodal, and Speech AI (Automatic Speech Recognition and Text-to-Speech)

18.8k
Nov 30, 2026
RepositoryPython
modelscope/ms-swift

Use PEFT or Full-parameter to CPT/SFT/DPO/GRPO 600+ LLMs (Qwen3.8, DeepSeek-V4, GLM-5.1, InternLM3, Llama4, ...) and 300+ MLLMs (Qwen3-VL, Qwen3-Omni, InternVL3.5, Ovis2.5, GLM5.3, Gemma4, Llava, Phi4, ...) (AAAI 2025).

16.2k
Dec 1, 2026
RepositoryPython
PaddlePaddle/PaddleSpeech

Easy-to-use Speech Toolkit including Self-Supervised Learning model, SOTA/Streaming ASR with punctuation, Streaming TTS with text frontend, Speaker Verification System, End-to-End Speech Translation and Keyword Spotting. Won NAACL2022 Best Demo Award.

12.7k
Aug 12, 2026
RepositoryPython
OpenPipe/ART

Agent Reinforcement Trainer: train multi-step agents for real-world tasks using GRPO. Give your agents on-the-job training. Reinforcement learning for Qwen3.6, GPT-OSS, Llama, and more!

10.9k
Nov 28, 2026
RepositoryPython
jaredpalmer/kev

Jev-like family of decision models built on top of Qwen3.5/3.8 you can train and run on your own

10.2k
Dec 3, 2026
RepositoryPython
wzpan/wukong-robot

🤖 wukong-robot 是一个简单、灵活、优雅的中文语音对话机器人/智能音箱项目,支持ChatGPT多轮对话能力,还可能是首个支持脑机交互的开源智能音箱项目。

7.1k
Nov 25, 2026