█

AI/TLDR

Buy me a coffee
Buy me a coffee

WeNet

Production-first end-to-end speech recognition, from training recipe to deployed runtime

Audio, Music & VoiceOpen source
Language
Python
License
Apache-2.0
$pip install git+https://github.com/wenet-e2e/wenet.git
IN SHORT

What is WeNet?

WeNet is an open-source speech recognition toolkit built around a single stated design principle: production first and production ready. It sits in the Audio, Music & Voice category of the Multimodal Generation tools and is open-source, written in Python and licensed Apache-2.0. To get started: install the Python package.

Overview

WeNet is an open-source speech recognition toolkit built around a single stated design principle: production first and production ready. Where many ASR projects stop at a research checkpoint, WeNet is organised so that the same model you train is the model you ship — the repository carries the training recipes, the pretrained models, and a separate C++ runtime you build for deployment.

Day to day it has two faces. The Python package is the quick one: install it, point the `wenet` command at a WAV file, and get a transcript back, choosing between Chinese models (`paraformer`, `firered`, `wenetspeech`) and English Whisper checkpoints (`whisper-large-v3`, `whisper-large-v3-turbo`). The full clone is the other: a conda environment with PyTorch, the dataset recipes, and an optional CMake build under `runtime/libtorch` for x86 deployment or language-model integration.

The project is a long-running academic-industrial effort — the README credits ESPnet for its transformer modelling, Kaldi for WFST-based decoding with language models, and EESEN for TLG graph construction, and cites the Interspeech 2021 WeNet paper and the WeNet 2.0 follow-up. It runs on CPU by default, on NVIDIA GPUs with a matching CUDA build of torch, and on Ascend NPUs through the `torch-npu` extra.

What it does

  • Pip-installable CLI and Python API: `wenet -m paraformer audio.wav` from the shell, or `wenet.load_model(...)` plus `model.transcribe(...)` in code
  • Pretrained models for both Chinese (paraformer, firered, wenetspeech) and English (whisper-large-v3, whisper-large-v3-turbo) selected with a single `-m` flag
  • Full training and fine-tuning recipes in the repository, alongside a conda environment spec and pinned torch/torchaudio versions
  • A separate C++ runtime you build with CMake for x86 deployment and language-model (LM) integration, with docs covering more platforms
  • Ascend NPU support through the `.[torch-npu]` extra, with a documented CANN/torch/torch-npu version compatibility table
  • Explicit device control — CPU by default, `--device cuda` (or `device='cuda'` in Python) to move onto the GPU

Getting started

For transcription, the pip package is enough. Training and deployment use the full clone instead — the README keeps those two paths separate on purpose.

Install the Python package

The package installs straight from the repository and pulls in torch 1.13 or newer.

bashbash
pip install git+https://github.com/wenet-e2e/wenet.git

Check your torch build sees the GPU

The install has no upper bound on torch, so pip can land a build newer than your driver supports. If this prints False on a GPU machine, torch silently falls back to CPU — reinstall a build matching your driver's CUDA version.

bashbash
python -c "import torch; print(torch.cuda.is_available())"

Transcribe from the command line

Pick the model with -m: paraformer, firered or wenetspeech for Chinese, whisper-large-v3 or whisper-large-v3-turbo for English. This runs on CPU unless you pass --device cuda.

bashbash
wenet -m paraformer audio.wav

Or call it from Python

The Python API loads the same models and returns a result object carrying the transcript.

pythonpython
import wenet

model = wenet.load_model('paraformer')
result = model.transcribe('audio.wav')
print(result.text)

Set up for training and deployment

Training uses the full clone in a conda environment. The README recommends CUDA 12.1 with torch 2.2.2+cu121.

bashbash
git clone https://github.com/wenet-e2e/wenet.git
conda create -n wenet python=3.10
conda activate wenet
conda install conda-forge::sox
pip install torch==2.2.2+cu121 torchaudio==2.2.2+cu121 -f https://download.pytorch.org/whl/torch_stable.html
pip install -r requirements.txt

Build the runtime (only if you need it)

Skip this unless you want the x86 runtime or language-model integration. Requires CMake 3.14 or above; see the runtime docs for other platforms.

bashbash
cd runtime/libtorch
mkdir build && cd build && cmake -DGRAPH_TOOLS=ON .. && cmake --build .

Commands and code are distilled from the project's own documentation — always check the official repo for the latest.

When to use it

  • Transcribe Chinese or English audio from a script or notebook without standing up a service, using the pip package and a pretrained model
  • Train or fine-tune an end-to-end ASR model on your own data with the repository's recipes, then deploy the same model through the C++ runtime
  • Add language-model integration to decoding via the WFST/TLG path when domain vocabulary matters more than raw end-to-end accuracy
  • Run speech recognition on Ascend NPU hardware using the documented torch-npu extra and CANN version table

How WeNet compares

WeNet alongside other open-source audio, music & voice tools AI/TLDR tracks, ranked by GitHub stars.

ToolStarsWhat it does
VoiceStudio★ 121kA local-first desktop voice studio that clones and designs voices, dubs video, and handles dictation, running 16 text-to-speech and 11 speech-recognition engines on your own hardware.
Whisper★ 114kOpenAI's speech recognition model that transcribes and translates audio across many languages.
GPT-SoVITS★ 64.3kAn open-source WebUI that clones a voice from a short audio sample and turns text into speech, with zero-shot and few-shot fine-tuning.
Voicebox★ 61.6kLocal-first voice studio that clones a voice from a short sample, generates speech across seven TTS engines and 23 languages, handles system-wide dictation, and speaks for agents over MCP.
VibeVoice★ 57.6kMicrosoft's text-to-speech model for generating long, expressive multi-speaker audio like podcasts.
whisper.cpp★ 55.7kA dependency-free C/C++ port of Whisper built on ggml, running speech recognition on CPU, Metal, CUDA, Vulkan and NPUs from phones to servers.
Coqui TTS★ 46.3kA library of text-to-speech models including the multilingual XTTS voice-cloning model.
WeNet★ 5.3kProduction-first end-to-end speech recognition, from training recipe to deployed runtime