espnet/espnet
End-to-End Speech Processing Toolkit
README
End-to-end speech processing toolkit
Documentation · Installation · Recipes · Model Zoo · Notebooks · Discord
______________________________________________________________________
ESPnet is an end-to-end speech processing toolkit built on PyTorch. It covers speech recognition, text-to-speech, speech translation, speech enhancement, speaker diarization, spoken language understanding, singing voice synthesis, speech language models, and more — with Kaldi-style reproducible recipes from data preparation to evaluation, and hundreds of pretrained models on Hugging Face.
What's new
ESPnet3 complete onegs3/librispeech_100 at ESPnet2
parity, CI rebuilt on a prebuilt image (compute per run halved), OpenBEATs
pretraining, ten new recipes (ASR, TTS, SER, ST, audio SSL), Python 3.12-3.13.
Earlier releases
Docker-based CI, PyTorch 2.9.1 support, FastSpeech2 inference ~1.9x faster at batch 8, new recipes (Kinyarwanda, Emilia, kosp2e). parallel-processing primitives, refactored inference and evaluation pipeline, expanded SpeechLM support. Python 3.9-3.13, Debian 12 CI, the LID subsystem completed, multi-optimizer training (HybridOptim / HybridLRS).
ESPnet3 groundwork (data organizer, trainer, model), LID training and task setup,
codec1 recipes, USES2 speech enhancement, IPAPack++ S2T recipes.
PyTorch Lightning trainer support, Hugging Face front-end, scaled dot-product
attention, ML-SUPERB 2024 recipe.
Full history: Releases.
Install
# Install PyTorch first: https://pytorch.org/get-started/locally/
pip install espnet
Other installation options
pip install "espnet[all]" # optional dependencies
pip install git+https://github.com/espnet/espnet # latest master
- Full setup (recipes, DNN training, Kaldi-style tooling): see the
- Docker: see
docker/and the Docker docs. - Task-specific tools live in
tools/installers. - ESPnet1 is no longer supported — use ESPnet2 (
egs2/) or ESPnet3 (egs3/). See the ESPnet1 notice.
Tested environments (CI status)
|system/pytorch ver.|2.9.1|2.10.0|2.11.0|
| :---- | :---: | :---: | :---: |
|ubuntu/python3.12/pip||
|
|
|ubuntu/python3.13/pip|
|
|
|
|debian12/python3.12/conda|
|||
|windows/python3.12/pip|
|||
|macos/python3.12/pip|
|||
|macos/python3.12/conda|
|||
Quick start
Run a pretrained model — any model from the ESPnet Hugging Face organization:
import soundfile as sf
from espnet2.bin.s2t_inference import Speech2Text
OWSM v4: multilingual ASR, translation, and language ID in one model
s2t = Speech2Text.from_pretrained("espnet/owsm_v4_small_370M", lang_sym="", task_sym="")
speech, rate = sf.read("audio.wav") # 16 kHz
text, *_ = s2t(speech)[0]
print(text)
Task-specific entry points follow the same pattern — espnet2.bin.asr_inference,
tts_inference, enh_inference, st_inference, spk_inference, and so on.
Train and evaluate a recipe — every corpus follows the same interface:
cd egs2/librispeech/asr1
./run.sh # full pipeline: data → features → training → scoring
./run.sh --stage 11 --stop_stage 13 # or run selected stages
New to ESPnet? Start with egs2/mini_an4/asr1 — it runs end to end in minutes.
Supported tasks
| | Task | Template | Highlights |
| :-- | :-- | :-- | :-- |
| 🗣️ | ASR — speech recognition | asr1, asr2 | Hybrid CTC/attention, Transducer, streaming, Conformer / E-Branchformer, Whisper, SSL front-ends |
| 🌏 | S2T — multilingual multitask | s2t1 | OWSM: open Whisper-style models trained on public data |
| 🔊 | TTS — text-to-speech | tts1, tts2 | Tacotron 2, FastSpeech 2, VITS, JETS, multi-speaker / multilingual |
| 🎤 | SVS — singing voice synthesis | svs1, svs2 | VISinger 1/2, Xiaoice, DiffSinger; merged from Muskits |
| 🎧 | SE/SS — enhancement & separation | enh1, enh_asr1 | Unified encoder–separator–decoder, TasNet / DPRNN / beamformers, ASR-integrated |
| 🌐 | ST / MT / S2ST — translation | st1, mt1, s2st1 | End-to-end and cascaded speech translation, speech-to-speech translation |
| 💬 | SLU — language understanding | slu1 | Intent + transcript multitasking, pretrained ASR/NLP encoders |
| 👤 | SPK / LID / DIAR — speaker & language | spk1, lid1, diar1 | Speaker embeddings, verification, language ID, diarization |
| 🧠 | SSL — self-supervised learning | ssl1, hubert1 | HuBERT pretraining; S3PRL upstreams as front-ends |
| 🤖 | SpeechLM — speech language models | speechlm1 | Unified sequence modeling across speech and text tasks |
| 📦 | Codec — neural audio codecs | codec1 | Discrete speech tokens for downstream tasks |
| ➕ | More | uasr1, cls1, asvspoof1, lm1, sds1 | Unsupervised ASR (EURO), audio classification, anti-spoofing, LM, spoken dialogue |
Each template ships a corpus-agnostic pipeline; see egs2/README.md for the full list
of 200+ corpora recipes.
Why ESPnet
- Reproducible — one
run.shper corpus, from download to scoring, with published results. - Unified — the same recipe structure, config format, and trainer across every task above.
- Scalable — DDP, multi-node training, Slurm/MPI,
- Open — hundreds of pretrained models and demos on
Demos
| Demo | |
| :-- | :-- |
| Real-time ASR | |
| Real-time TTS |
|
| Speech enhancement |
|
| Streaming enhancement |
|
| Hugging Face Spaces | ASR · TTS |
More notebooks: espnet/notebook.
Learn
- Documentation · ESPnet2 tutorial
- Course tutorials at CMU: usage · adding new models/tasks (materials)
- Interspeech 2019 tutorial
Contributing
Contributions, questions, and feature requests are all welcome — open an issue or a pull request. First time here? Read the contribution guide.
Details
Full feature list by task
Kaldi-style complete recipe
- Support numbers of
ASRrecipes (WSJ, Switchboard, CHiME-4/5, Librispeech, TED, CSJ, AMI, HKUST, Voxforge, REVERB, Gigaspeech, etc.) - Support numbers of
TTSrecipes in a similar manner to the ASR recipe (LJSpeech, LibriTTS, M-AILABS, etc.) - Support numbers of
STrecipes (Fisher-CallHome Spanish, Libri-trans, IWSLT'18, How2, Must-C, Mboshi-French, etc.) - Support numbers of
MTrecipes (IWSLT'14, IWSLT'16, the above ST recipes etc.) - Support numbers of
SLUrecipes (CATSLU-MAPS, FSC, Grabo, IEMOCAP, JDCINAL, SNIPS, SLURP, SWBD-DA, etc.) - Support numbers of
SE/SSrecipes (DNS-IS2020, LibriMix, SMS-WSJ, VCTK-noisyreverb, WHAM!, WHAMR!, WSJ-2mix, etc.) - Support voice conversion recipe (VCC2020 baseline)
- Support speaker diarization recipe (mini_librispeech, librimix)
- Support singing voice synthesis recipe (ofuton_p_utagoe_db, opencpop, m4singer, etc.)
ASR: Automatic Speech Recognition
- State-of-the-art performance in several ASR benchmarks (comparable/superior to hybrid DNN/HMM and CTC)
- Hybrid CTC/attention based end-to-end ASR
- Fast/accurate training with CTC/attention multitask training
- CTC/attention joint decoding to boost monotonic alignment decoding
- Encoder: VGG-like CNN + BiRNN (LSTM/GRU), sub-sampling BiRNN (LSTM/GRU), Transformer, Conformer, Branchformer, or E-Branchformer
- Decoder: RNN (LSTM/GRU), Transformer, or S4
- Attention: Flash Attention, Dot product, location-aware attention, variants of multi-head
- Incorporate RNNLM/LSTMLM/TransformerLM/N-gram trained only with text data
- Batch GPU decoding
- Data augmentation
- Transducer based end-to-end ASR
- Architecture:
- Custom encoder supporting RNNs, Conformer, Branchformer (w/ variants), 1D Conv / TDNN.
- Decoder w/ parameters shared across blocks supporting RNN, stateless w/ 1D Conv, MEGA, and RWKV.
- Pre-encoder: VGG2L or Conv2D available.
- Search algorithms:
- Greedy search constrained to one emission by timestep.
- Default beam search algorithm [[Graves, 2012]](https://arxiv.org/abs/1211.3711) without prefix search.
- Alignment-Length Synchronous decoding [[Saon et al., 2020]](https://ieeexplore.ieee.org/abstract/document/9053040).
- Time Synchronous Decoding [[Saon et al., 2020]](https://ieeexplore.ieee.org/abstract/document/9053040).
- N-step Constrained beam search modified from [[Kim et al., 2020]](https://arxiv.org/abs/2002.03577).
- modified Adaptive Expansion Search based on [[Kim et al., 2021]](https://ieeexplore.ieee.org/abstract/document/9250505) and NSC.
- Features:
- Unified interface for offline and streaming speech recognition.
- Multi-task learning with various auxiliary losses:
- Encoder: CTC, auxiliary Transducer and symmetric KL divergence.
- Decoder: cross-entropy w/ label smoothing.
- Transfer learning with an acoustic model and/or language model.
- Training with FastEmit regularization method [[Yu et al., 2021]](https://arxiv.org/abs/2010.11148).
- CTC segmentation
- Non-autoregressive model based on Mask-CTC
- ASR examples for supporting endangered language documentation (Please refer to egs/puebla_nahuatl and egs/yoloxochitl_mixtec for details)
- Wav2Vec2.0 pre-trained model as Encoder, imported from FairSeq.
- Self-supervised learning representations as features, using upstream models in S3PRL in frontend.
- Set
frontendtos3prl - Select any upstream model by setting the
frontend_confto the corresponding name. - Transfer Learning :
- easy usage and transfers from models previously trained by your group or models from ESPnet Hugging Face repository.
- Documentation and toy example runnable on colab.
- Streaming Transformer/Conformer ASR with blockwise synchronous beam search.
- Restricted Self-Attention based on Longformer as an encoder for long sequences
- OpenAI Whisper model, robust ASR based on large-scale, weakly-supervised multitask learning
- Real-time ASR demo with ESPnet2
- Gradio Web Demo on Hugging Face Spaces. Check out the Web Demo
- Streaming Transformer ASR Local Demo with ESPnet2.
TTS: Text-to-speech
- Architecture
- Tacotron2
- Transformer-TTS
- FastSpeech
- FastSpeech2
- Conformer FastSpeech & FastSpeech2
- VITS
- JETS
- Multi-speaker & multi-language extension
- Pre-trained speaker embedding (e.g., X-vector)
- Speaker ID embedding
- Language ID embedding
- Global style token (GST) embedding
- Mix of the above embeddings
- End-to-end training
- End-to-end text-to-wav model (e.g., VITS, JETS, etc.)
- Joint training of text2mel and vocoder
- Various language support
- En / Jp / Zn / De / Ru / And more...
- Integration with neural vocoders
- Parallel WaveGAN
- MelGAN
- Multi-band MelGAN
- HiFiGAN
- StyleMelGAN
- Mix of the above models
- Real-time TTS demo with ESPnet2
- Integrated to Hugging Face Spaces with Gradio. See demo:
SE: Speech enhancement (and separation)
- Single-speaker speech enhancement
- Multi-speaker speech separation
- Unified encoder-separator-decoder structure for time-domain and frequency-domain models
- Encoder/Decoder: STFT/iSTFT, Convolution/Transposed-Convolution
- Separators: BLSTM, Transformer, Conformer, TasNet, DPRNN, SkiM, SVoice, DC-CRN, DCCRN, Deep Clustering, Deep Attractor Network, FaSNet, iFaSNet, Neural Beamformers, etc.
- Flexible ASR integration: working as an individual task or as the ASR frontend
- Easy to import pre-trained models from Asteroid
- Both the pre-trained models from Asteroid and the specific configuration are supported.
ST: Speech Translation & MT: Machine Translation
- State-of-the-art performance in several ST benchmarks (comparable/superior to cascaded ASR and MT)
- Transformer-based end-to-end ST (new!)
- Transformer-based end-to-end MT (new!)
VC: Voice conversion
- Transformer and Tacotron2-based parallel VC using Mel spectrogram
- End-to-end VC based on cascaded ASR+TTS (Baseline system for Voice Conversion Challenge 2020!)
SLU: Spoken Language Understanding
- Architecture
- Transformer-based Encoder
- Conformer-based Encoder
- Branchformer based Encoder
- E-Branchformer based Encoder
- RNN based Decoder
- Transformer-based Decoder
- Support Multitasking with ASR
- Predict both intent and ASR transcript
- Support Multitasking with NLU
- Deliberation encoder based 2 pass model
- Support using pre-trained ASR models
- Hubert
- Wav2vec2
- VQ-APC
- TERA and more ...
- Support using pre-trained NLP models
- BERT
- MPNet And more...
- Various language support
- En / Jp / Zn / Nl / And more...
- Supports using context from previous utterances
- Supports using other tasks like SE in a pipeline manner
- Supports Two Pass SLU that combines audio and ASR transcript
- Performing noisy spoken language understanding using a speech enhancement model followed by a spoken language understanding model.
- Performing two-pass spoken language understanding where the second pass model attends to both acoustic and semantic information.
- Integrated to Hugging Face Spaces with Gradio. See SLU demo on multiple languages:
SUM: Speech Summarization
- End to End Speech Summarization Recipe for Instructional Videos using Restricted Self-Attention [[Sharma et al., 2022]](https://arxiv.org/abs/2110.06263)
SVS: Singing Voice Synthesis
- Framework merge from Muskits
- Architecture
- RNN-based non-autoregressive model
- Xiaoice
- Tacotron-singing
- DiffSinger (in progress)
- VISinger
- VISinger 2 (its variations with different vocoders-architecture)
- Support multi-speaker & multilingual singing synthesis
- Speaker ID embedding
- Language ID embedding
- Various language support
- Jp / En / Kr / Zh
- Tight i