ASR Concurrent Stream Server
Concurrent streaming gRPC server and client for Qwen3-ASR.
Installation
pip install asr-concurrent-stream
For client-side audio loading and VAD segmentation:
pip install asr-concurrent-stream[client]
For development (regenerating protobuf code):
pip install asr-concurrent-stream[dev]
Note: The server requires vllm and transformers to run the Qwen3-ASR model. These are installed automatically with the package.
Quick Start
Start the server
asr-concurrent-server
The server reads configuration from environment variables:
| Variable | Default | Description |
|---|---|---|
ASR_PORT |
8000 |
gRPC server port |
ASR_MODEL_PATH |
Qwen/Qwen3-ASR-1.7B |
Model path or HuggingFace ID |
ASR_GPU_MEMORY_UTILIZATION |
0.30 |
GPU memory fraction |
ASR_MAX_MODEL_LEN |
4096 |
Maximum model sequence length |
ASR_MAX_CONCURRENT_STREAMS |
15 |
Maximum concurrent streams |
ASR_MAX_BATCH_SIZE |
8 |
Maximum batch size |
ASR_BATCH_TIMEOUT_MS |
50 |
Batch timeout in milliseconds |
ASR_WORKER_THREADS |
4 |
Number of worker threads |
ASR_HEALTH_PORT |
8080 |
HTTP health check port |
Run the client
asr-concurrent-client --audio path/to/audio.wav --language Italian
Dependencies
| Package | Purpose |
|---|---|
grpcio |
gRPC framework |
numpy |
Audio array handling |
protobuf |
Protocol buffer serialization |
vllm |
vLLM inference engine |
transformers |
Model processor and tokenizer |
Optional client dependencies: soundfile, torch (for Silero VAD segmentation).
Docker image for the Qwen3-ASR concurrent streaming gRPC server.
Image Composition
| Layer | Detail |
|---|---|
| Base OS | Ubuntu 24.04 LTS |
| CUDA | NVIDIA CUDA 12.8.0 (nvidia/cuda:12.8.0-runtime-ubuntu24.04) |
| Python | 3.12 (deadsnakes PPA), installed into /opt/venv |
| Model | Qwen/Qwen3-ASR-1.7B baked into the image |
| Server port | Container 8002 (map to any host port at runtime) |
Installation Sequence
- System dependencies —
curl,git,wget,build-essential,ffmpeg,libsox-*,libsndfile1,libopus0,libffi-dev. - Python 3.12 — installed via deadsnakes PPA, venv created at
/opt/venv, binaries symlinked to/usr/local/bin. - pip — upgraded to latest
pip,setuptools,wheel. qwen-asr[vllm]— installs the full Qwen3-ASR stack with vLLM extras (transformers, vllm, torch, accelerate, librosa, soundfile, etc. with pinned versions).- flash-attention — prebuilt wheel for CUDA 12.8 + PyTorch 2.9 + Python 3.12.
- Project files —
ASR_Concurrent_Stream/copied to/app/ASR_Concurrent_Stream/. - Model download —
Qwen/Qwen3-ASR-1.7Bdownloaded from HuggingFace to/app/models/Qwen3-ASR-1.7B. - Launcher patch —
run_asr_grpc_server.shis updated:PORT→8002MODEL_PATH→/app/models/Qwen3-ASR-1.7BQWEN3_ASR_PATH→ site-packagesqwen_asrpath
Build & Run
# Build
docker build -t qwen3-asr-server:latest .
# Run (map host port 8002 to container port 8002)
docker run -d \
--name qwen3-asr-server \
--gpus all \
-p 8002:8002 \
--shm-size=16g \
--ulimit memlock=-1 \
--restart unless-stopped \
qwen3-asr-server:latest
# View logs
docker logs -f qwen3-asr-server
# Stop & remove
docker stop qwen3-asr-server && docker rm qwen3-asr-server
Server Configuration
Hard-coded defaults in server/run_asr_grpc_server.sh:
| Parameter | Value |
|---|---|
| Port | 8002 |
| Model | /app/models/Qwen3-ASR-1.7B |
| GPU memory utilization | 0.35 |
| Max model length | 4096 |
| Max concurrent streams | 10 |
| Max batch size | 8 |
| Batch timeout | 50 ms |
| Worker threads | 4 |
Project Structure (in image)
/app/
├── ASR_Concurrent_Stream/
│ ├── proto/ # gRPC protobuf definitions
│ ├── server/
│ │ ├── asr_grpc_server.py
│ │ ├── _launch_server.py
│ │ ├── stream_manager.py
│ │ ├── inference_coordinator.py
│ │ └── run_asr_grpc_server.sh
│ └── client/
│ └── example_client.py
└── models/
└── Qwen3-ASR-1.7B/ # Pre-downloaded model
Metadata
Release files for asr-concurrent-stream 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| asr_concurrent_stream-1.0.0.tar.gz | 24.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| asr_concurrent_stream-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 52.9 kB
Release files / asr_concurrent_stream-1.0.0.tar.gz
| Download URL | asr_concurrent_stream-1.0.0.tar.gz |
|---|---|
| Size | 24.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f7a84954191b96050c5202d331af12e71d3a3398b17637a47a05992a263eeafa
|
|
BLAKE2b-256 checksum How to use checksums |
4f72e374e2d21631abbc8bc0f1eff47674039dd5d4b26365a05e3e574ec47588
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.
Transparency logRelease files / asr_concurrent_stream-1.0.0-py3-none-any.whl
| Download URL | asr_concurrent_stream-1.0.0-py3-none-any.whl |
|---|---|
| Size | 28.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
296cfc7ba0fffa0392db3a74cb86d257f1bb9434dacbcc3a09dc65b1e52972ad
|
|
BLAKE2b-256 checksum How to use checksums |
a72bd645138581db0f33c5a55d833604b9ab3cdcaa91322650d525bb8b234190
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.
Transparency log