/wenet

Production First and Production Ready End-to-End Speech Recognition Toolkit

Primary LanguageC++Apache License 2.0Apache-2.0

WeNet

License Python-Version

Roadmap | Docs | Papers | Runtime (x86) | Runtime (android) | Pretrained Models

We share neural Net together.

The main motivation of WeNet is to close the gap between research and production end-to-end (E2E) speech recognition models, to reduce the effort of productionizing E2E models, and to explore better E2E models for production.

🔥 News

  • 2022.07.21: RNN-T is supported now, see rnnt for benchmark.
  • 2022.07.03: Python binding is stable, see python binding for usage.

Highlights

  • Production first and production ready: The core design principle of WeNet. WeNet provides full stack solutions for speech recognition.

    • Unified solution for streaming and non-streaming ASR: U2++ framework--develop, train, and deploy only once.
    • Runtime solution: built-in server x86 and on-device android runtime solution.
    • Model exporting solution: built-in solution to export model to LibTorch/ONNX for inference.
    • LM solution: built-in production-level LM solution.
    • Other production solutions: built-in contextual biasing, time stamp, endpoint, and n-best solutions.
  • Accurate: WeNet achieves SOTA results on a lot of public speech datasets.

  • Light weight: WeNet is easy to install, easy to use, well designed, and well documented.

Performance Benchmark

Please see examples/$dataset/s0/README.md for benchmark on different speech datasets.

Installation(Python Only)

If you just want to use WeNet as a python package for speech recognition application, just install it by pip, please note python 3.6+ is required.

pip3 install wenet

And please see doc for usage.

Installation(Training and Developing)

  • Clone the repo
git clone https://github.com/wenet-e2e/wenet.git
conda create -n wenet python=3.8
conda activate wenet
pip install -r requirements.txt
conda install pytorch=1.10.0 torchvision torchaudio=0.10.0 cudatoolkit=11.1 -c pytorch -c conda-forge
  • Optionally, if you want to use x86 runtime or language model(LM), you have to build the runtime as follows. Otherwise, you can just ignore this step.
# runtime build requires cmake 3.14 or above
cd runtime/libtorch
mkdir build && cd build && cmake .. && cmake --build .

Discussion & Communication

Please visit Discussions for further discussion.

For Chinese users, you can aslo scan the QR code on the left to follow our offical account of WeNet. We created a WeChat group for better discussion and quicker response. Please scan the personal QR code on the right, and the guy is responsible for inviting you to the chat group.

If you can not access the QR image, please access it on gitee.

Or you can directly discuss on Github Issues.

Contributors

Acknowledge

  1. We borrowed a lot of code from ESPnet for transformer based modeling.
  2. We borrowed a lot of code from Kaldi for WFST based decoding for LM integration.
  3. We referred EESEN for building TLG based graph for LM integration.
  4. We referred to OpenTransformer for python batch inference of e2e models.

Citations

@inproceedings{yao2021wenet,
  title={WeNet: Production oriented Streaming and Non-streaming End-to-End Speech Recognition Toolkit},
  author={Yao, Zhuoyuan and Wu, Di and Wang, Xiong and Zhang, Binbin and Yu, Fan and Yang, Chao and Peng, Zhendong and Chen, Xiaoyu and Xie, Lei and Lei, Xin},
  booktitle={Proc. Interspeech},
  year={2021},
  address={Brno, Czech Republic },
  organization={IEEE}
}

@article{zhang2022wenet,
  title={WeNet 2.0: More Productive End-to-End Speech Recognition Toolkit},
  author={Zhang, Binbin and Wu, Di and Peng, Zhendong and Song, Xingchen and Yao, Zhuoyuan and Lv, Hang and Xie, Lei and Yang, Chao and Pan, Fuping and Niu, Jianwei},
  journal={arXiv preprint arXiv:2203.15455},
  year={2022}
}