espnet/espnet

★ 9,960⑂ 0

End-to-End Speech Processing Toolkit

9,960Star
0Fork
0Watch
0Issue
PythonLanguage
-License
Created · last push · repository size 0 KB · default branch -

README

https://github.com/espnet/espnet/blob/HEAD/ESPnet

End-to-end speech processing toolkit

PyPI Python Downloads License codecov Hugging Face Discord

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 on egs3/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
installation guide.
Tested environments (CI status)

|system/pytorch ver.|2.9.1|2.10.0|2.11.0| | :---- | :---: | :---: | :---: | |ubuntu/python3.12/pip|ci on ubuntu|ci on ubuntu|ci on ubuntu| |ubuntu/python3.13/pip|ci on ubuntu|ci on ubuntu|ci on ubuntu| |debian12/python3.12/conda|ci on debian12||| |windows/python3.12/pip|ci on windows||| |macos/python3.12/pip|ci on macos||| |macos/python3.12/conda|ci on macos|||

pre-commit.ci Code style: black Imports: isort Mergify

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

DeepSpeed, sharded training, on-the-fly feature extraction. Hugging Face, plus W&B and TensorBoard logging.

Demos

| Demo | | | :-- | :-- | | Real-time ASR | Colab | | Real-time TTS | Colab | | Speech enhancement | Colab | | Streaming enhancement | Colab | | Hugging Face Spaces | ASR · TTS |

More notebooks: espnet/notebook.

Learn

Contributing

Contributions, questions, and feature requests are all welcome — open an issue or a pull request. First time here? Read the contribution guide.

https://github.com/espnet/espnet/blob/HEAD/Contributors

Details

Full feature list by task

Kaldi-style complete recipe

  • Support numbers of ASR recipes (WSJ, Switchboard, CHiME-4/5, Librispeech, TED, CSJ, AMI, HKUST, Voxforge, REVERB, Gigaspeech, etc.)
  • Support numbers of TTS recipes in a similar manner to the ASR recipe (LJSpeech, LibriTTS, M-AILABS, etc.)
  • Support numbers of ST recipes (Fisher-CallHome Spanish, Libri-trans, IWSLT'18, How2, Must-C, Mboshi-French, etc.)
  • Support numbers of MT recipes (IWSLT'14, IWSLT'16, the above ST recipes etc.)
  • Support numbers of SLU recipes (CATSLU-MAPS, FSC, Grabo, IEMOCAP, JDCINAL, SNIPS, SLURP, SWBD-DA, etc.)
  • Support numbers of SE/SS recipes (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).
> Please refer to the tutorial page for complete documentation.
  • 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 frontend to s3prl
  • Select any upstream model by setting the frontend_conf to 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
Demonstration

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
Demonstration To train the neural vocoder, please check the following repositories:

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.
Demonstration
  • Interactive SE demo with ESPnet2 Open In Colab
  • Streaming SE demo with ESPnet2 Open In Colab

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
Demonstration
  • Performing noisy spoken language understanding using a speech enhancement model followed by a spoken language understanding model. Open In Colab
  • Performing two-pass spoken language understanding where the second pass model attends to both acoustic and semantic information. Open In Colab
  • Integrated to Hugging Face Spaces with Gradio. See SLU demo on multiple languages: Hugging Face Spaces

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

More Audio Trending projects

1

huggingface / transformers

Python★ 166,108⑂ 0
2

harry0703 / MoneyPrinterTurbo

Python★ 123,776⑂ 0
3

unslothai / unsloth

Python★ 76,181⑂ 0
4

RVC-Boss / GPT-SoVITS

Python★ 61,798⑂ 0
5

calesthio / OpenMontage

Python★ 59,205⑂ 0
6

ggml-org / whisper.cpp

C++★ 53,674⑂ 0