Deployment contract
OpenAI-compatible private API
Serve FunASR models through `/v1/audio/transcriptions` for existing SDKs, agents, and workflows.
Workload boundary
Decide whether it fits your production constraints
Good fit
- Replacing a cloud transcription API
- Reusing OpenAI SDK or HTTP clients
- Health checks and model discovery are required
Not a fit
- Anonymous browser access to a production worker
- Public exposure without a gateway
- Strict chunk-by-chunk live captions
| Models | sensevoice / paraformer / paraformer-en / fun-asr-nano |
|---|---|
| Hardware | cpu / nvidia-gpu / kubernetes |
| Operating systems | Linux / macOS / Windows |
| Interfaces | OpenAI-compatible HTTP / OpenAPI / Python SDK / JavaScript |
Run path
From installation to known-audio verification
These commands come from the current verification registry. Pin dependencies, model, and hardware before rollout.
Install
pip install funasr fastapi uvicorn python-multipart
Launch
cd examples/openai_api && python server.py --model sensevoice --device cpu --port 8000
Health check
curl -fsS http://localhost:8000/health
curl -fsS http://localhost:8000/v1/models
Smoke test
Minimum verification before promotion
cd examples/openai_api && python smoke_test.py --base-url http://localhost:8000
Operations and capacity
Move from runnable to operable
Operational checks
- Use `/health` for readiness
- Use `/v1/models` to verify loaded models
- Persist and warm the model cache before rollout
Capacity variables
- Audio duration, language, channels, and VAD segment distribution
- Concurrency, queue time, warmup, and model-cache state
- Exact hardware, driver, runtime, and thread configuration
Troubleshooting
- Run the repository smoke_test.py first
- Ensure the client base_url includes `/v1`
- Separate model-loading failures from request-format failures
Security boundary
Treat production ingress as untrusted
- Implement authentication, quotas, audit, and TLS at the gateway
- Limit MIME types, file sizes, and request duration
- Accept traffic only from trusted reverse proxies
Known limitation
The example server does not include production authentication, tenant quotas, or full observability; provide them at the gateway and infrastructure layers.
Public benchmarks are reproduction starting points, not substitutes for target-workload testing.
Evidence and feedback