espnet/espnet

★ 9,963⑂ 0

End-to-End Speech Processing Toolkit

About espnet/espnet

espnet/espnet is an open-source project on GitHub, mainly written in Python. End-to-End Speech Processing Toolkit It currently holds 9,963 stars and 0 forks with 0 open issues, and was last pushed on an unknown date (repository created unknown).

Project Overview

Git Homed tracks it on the Audio Trending board and on the AI Audio Trending list.

GitHub Repository Details

Repository espnet/espnet · default branch - · size 0 KB · watchers 0 · source: GitHub REST API and repository README

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

the command line grows espnet demo (the OWSM browser demo) and `espnet asr --live (the microphone, transcribed as you speak); one Speech2Text` now loads either kind of OWSM checkpoint, with best_path() for CTC decoding without a search; espnet/espnet:inference-cpu-latest and -gpu-latest run a published model with nothing installed; three more demo Spaces (TTS, enhancement, speaker verification).
Earlier releases one-line inference from the command line (pip install espnet && espnet asr audio.wav), two OWSM v4 demos as Hugging Face Spaces, a core install without the training stack (training is espnet[train]), batched beam search, PyTorch 2.11-2.14. 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. 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              # run pretrained models
pip install "espnet[train]"     # also train them, with espnet2 or espnet3 (Lightning, TensorBoard, W&B, Hydra, Dask, ...)
Other installation options
pip install "espnet[all]"                       # training plus every task extra (except sds)
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.11.0|2.13.0|2.14.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|||

Each badge is its workflow's aggregate status on master, where the full grid runs. Coverage is not uniform — some suites run on one pytorch only, and a pull request runs less than master does. What each column covers.

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

Quick start

From the terminal — no code, on any audio file:

pip install espnet
espnet asr audio.wav                       # transcribe, detecting the language
espnet translate audio.wav --to eng        # speech in, English text out
espnet tts "Hello from ESPnet" -o out.wav
espnet enhance noisy.wav -o clean.wav
espnet asr --live                          # transcribe the microphone
espnet models                              # the default model of each command
pip install "espnet[demo]"
espnet demo                                # the same model in your browser

Every command takes --model and --device cuda, and espnet --version names the installed version. espnet demo serves, on localhost, the app behind the OWSM-CTC v4 Space — recording, upload, the checkpoint's own language and translation menus, and long-form decoding — and takes --port and --share.

Without installing anything — the same commands, in a container:

docker run --rm -v "$PWD:/data" -v "$HOME/.cache/huggingface:/cache/huggingface" \
    espnet/espnet:inference-cpu-latest asr /data/audio.wav

With a GPU, espnet/espnet:inference-gpu-latest, --gpus all and --device cuda.

The second mount is what keeps the downloaded model between runs; on a Linux host add --user "$(id -u):$(id -g)", so that what it writes belongs to you. The other two images, and what each is for, are in docker/.

From Python — any model from the ESPnet Hugging Face organization:

from espnet2.bin.s2t_inference import Speech2Text

OWSM-CTC v4: multilingual ASR, translation and language ID in one

encoder-only model. No beam search: one encoder pass per 30 s window.

s2t = Speech2Text.from_pretrained( "espnet/owsm_ctc_v4_1B", lang_sym="", task_sym="" ) for start, end, text in s2t.decode_long("audio.wav"): # any length or rate print(text)

The 4 GB checkpoint is cached after the first download. device="cuda" runs on a GPU, task_sym="<st_deu>" translates, lang_sym="" identifies the language. The same class loads the encoder-decoder OWSM v4 models: decode_long then decodes segment by segment on the model's own timestamps, s2t(speech) runs the beam search, and s2t.best_path(speech) is the CTC head with no search. Every other task — asr_inference, tts_inference, enh_inference, spk_inference — follows the same from_pretrained pattern.

From an agentpip install "espnet[mcp]", then register espnet-mcp as an MCP server (Claude Code: claude mcp add espnet -- espnet-mcp). Agents then call transcribe, synthesize and enhance themselves.

Train a recipe — every corpus follows the same interface:

cd egs2/librispeech/asr1
./run.sh                              # data → features → training → scoring
./run.sh --stage 11 --stop_stage 13   # or 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 | | | :-- | :-- | | Spoken dialogue — ASR → LLM → TTS, cascaded or end-to-end, with live metrics | recipe (Gradio, runs locally) | | Real-time ASR | Colab | | Real-time TTS | Colab | | Speech enhancement | Colab | | Streaming enhancement | Colab |

More notebooks: espnet/notebook.

Publish your own. Every ESPnet3 recipe can wrap its trained model in a Gradio app and push it to Hugging Face Spaces — the UI, the Space README.md and requirements.txt are all generated from conf/demo.yaml.

The three stages
cd egs3/librispeech_100/asr
train=conf/tuning/training_e_branchformer.yaml   # the config the model was trained with
python run.py --stages pack_model  --training_config $train --publication_config conf/publication.yaml  # -> exp/.../model_pack
python run.py --stages pack_demo   --training_config $train --demo_config conf/demo.yaml                # -> demo/
python run.py --stages upload_demo --training_config $train --demo_config conf/demo.yaml                # needs hf auth login

Run the packed app locally with python demo/app.py.

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 (see egs2/puebla_nahuatl and egs2/yoloxochitl_mixtec)
  • 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
  • Real-time ASR demo with ESPnet2 Open In Colab
  • Hosted demo: OWSM-CTC v4, maintained from egs2/owsm_ctc_v4/s2t1/demo — recognises and identifies 151 languages, translates into 25 of them, and decodes long-form audio
  • Hosted demo: OWSM v4, maintained from egs2/owsm_v4/s2t1/demo — the same four tasks with the encoder-decoder model, which also takes a text prompt
  • 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
Demonstration To train the neural vocoder, please check the following repositories:
  • [kan-bayashi/ParallelWaveGAN

GitHub Stars & Activity

9,963Stars
0Forks
0Open issues
PythonLanguage

GitHub Popularity

GitHub stars9,963
Forks0
Open issues0
Primary languagePython
License-
Stars gained today0
Created-
Last pushed-

Trending History

Trending statusnot on today's boards

Related GitHub Projects

1

huggingface / transformers

Python★ 166,440⑂ 0
2

harry0703 / MoneyPrinterTurbo

Python★ 124,806⑂ 0
3

unslothai / unsloth

Python★ 76,471⑂ 0
4

RVC-Boss / GPT-SoVITS

Python★ 61,961⑂ 0
5

calesthio / OpenMontage

Python★ 60,319⑂ 0
6

coqui-ai / TTS

Python★ 46,029⑂ 0
7

2noise / ChatTTS

Python★ 39,856⑂ 0
8

OpenBMB / VoxCPM

Python★ 37,818⑂ 0

More Trending Repositories