Deployment contract

ONNX / C++ CPU runtime

Deploy offline, online, and two-pass ASR on general CPUs with ONNX Runtime and C++ paths.

Maturity
Community verified
FunASR
1.3.29
Runtime
ONNX Runtime C++ and Python
Verified
2026-07-26

Workload boundary

Decide whether it fits your production constraints

Good fit

  • High-concurrency CPU services
  • Embedded or local applications
  • An existing Paraformer online path already meets quality goals

Not a fit

  • LLM decoding and open-ended instructions
  • Moving proven CPU traffic to GPU without tests
  • Workflows that depend on Python-only business plugins
ModelsParaformer / Paraformer-online / SenseVoiceSmall / FSMN-VAD / CT-Transformer punctuation
Hardwarecpu
Operating systemsLinux / macOS / Windows
InterfacesC++ / ONNX Runtime / Python ONNX / HTTP / WebSocket

Run path

From installation to known-audio verification

These commands come from the current verification registry. Pin dependencies, model, and hardware before rollout.

Install

cd runtime/onnxruntime && cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j

Launch

python runtime/python/onnxruntime/demo_sencevoice_small.py

Health check

test -x runtime/onnxruntime/build/bin/funasr-onnx-offline

Smoke test

Minimum verification before promotion

python runtime/python/onnxruntime/demo_paraformer_offline.py

Operations and capacity

Move from runnable to operable

Operational checks

  • Pin ONNX Runtime and model versions
  • Tune model, decoder, and I/O threads separately
  • Monitor realtime ratio, CPU saturation, and queue depth

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

  • Start with a single-file offline example
  • More threads do not guarantee linear throughput
  • Evaluate deterministic text post-processing before changing models for fixed terms

Security boundary

Treat production ingress as untrusted

Known limitation

Model conversion, operator support, and thread settings vary by platform; measure capacity on the target CPU with real audio.

Public benchmarks are reproduction starting points, not substitutes for target-workload testing.

Evidence and feedback

Verify this contract against primary material