[Paper Review] WeNet: Production oriented Streaming and Non-streaming End-to-End Speech Recognition Toolkit
WeNet is a production-ready, open-source end-to-end speech recognition toolkit that unifies streaming and non-streaming ASR through a novel two-pass U2 architecture combining CTC and attention decoding. It achieves 5.03% relative CER reduction on AISHELL-1 and supports low-latency inference with optimized runtime on both server and edge devices via PyTorch and TorchScript.
In this paper, we propose an open source, production first, and production ready speech recognition toolkit called WeNet in which a new two-pass approach is implemented to unify streaming and non-streaming end-to-end (E2E) speech recognition in a single model. The main motivation of WeNet is to close the gap between the research and the production of E2E speechrecognition models. WeNet provides an efficient way to ship ASR applications in several real-world scenarios, which is the main difference and advantage to other open source E2E speech recognition toolkits. In our toolkit, a new two-pass method is implemented. Our method propose a dynamic chunk-based attention strategy of the the transformer layers to allow arbitrary right context length modifies in hybrid CTC/attention architecture. The inference latency could be easily controlled by only changing the chunk size. The CTC hypotheses are then rescored by the attention decoder to get the final result. Our experiments on the AISHELL-1 dataset using WeNet show that, our model achieves 5.03\% relative character error rate (CER) reduction in non-streaming ASR compared to a standard non-streaming transformer. After model quantification, our model perform reasonable RTF and latency.
Motivation & Objective
- Address the gap between research and production deployment of end-to-end (E2E) speech recognition models.
- Unify streaming and non-streaming ASR in a single model to reduce development, training, and deployment costs.
- Enable efficient, low-latency inference on diverse hardware platforms including edge devices.
- Provide a seamless transition from research training to production inference using PyTorch and TorchScript.
- Optimize model efficiency through quantization, dynamic chunking, and runtime portability across platforms.
Proposed method
- Propose the U2 framework: a two-pass joint CTC/attention model with a shared encoder (Transformer or Conformer), CTC decoder, and attention decoder.
- Use dynamic chunk-based self-attention to allow context modeling with variable-length receptive fields, enabling streaming inference.
- Apply a two-pass decoding strategy: first-pass CTC decoding for streaming hypothesis generation, second-pass attention decoding for rescoring and improved accuracy.
- Implement a hybrid CTC/attention architecture where the shared encoder processes input with limited right context to balance latency and performance.
- Utilize dynamic chunk training with causal convolutions in Conformer to support streaming while preserving global context modeling.
- Support model export via TorchScript and deployment on multiple runtimes (e.g., LibTorch, ONNX, OpenVINO, MNN, NCNN) for cross-platform compatibility.

Experimental results
Research questions
- RQ1Can a unified E2E model achieve high accuracy in both streaming and non-streaming ASR scenarios without separate model training?
- RQ2How can dynamic chunking and attention mechanisms be combined to maintain low latency while preserving recognition accuracy?
- RQ3To what extent can a single model with CTC and attention decoding reduce latency and improve inference efficiency in real-world deployments?
- RQ4How does the two-pass rescoring mechanism affect character error rate (CER) compared to standard non-streaming models?
- RQ5What is the impact of model quantization and runtime optimization on real-time factor (RTF) and end-to-end latency in production environments?
Key findings
- The U2 model achieves a 5.03% relative CER reduction on the AISHELL-1 dataset compared to a standard non-streaming Transformer model.
- On the 15,000-hour Mandarin dataset, the U2 model achieves 3.70% CER on AISHELL-1, outperforming the full-attention Conformer baseline of 3.96% when using full attention decoding.
- Final latency (L3) on the x86 server platform is 130ms with a decoding chunk size of 4, dominated by the rescoring cost (L2) of ~114ms.
- Rescoring cost remains nearly constant across different chunk sizes, indicating that latency reduction should focus on optimizing the second-pass attention decoding.
- The model maintains strong performance with a 16-frame chunk size, showing minimal degradation in CER, which supports practical deployment with low latency.
- The toolkit enables direct export of trained models via TorchScript and supports deployment on both x86 and ARM platforms, demonstrating production readiness.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.