All models

speech-seq2seq (speech-encoder-decoder)

A speech-to-text model that joins a Wav2Vec2 speech encoder to a BERT text decoder.

Audio and speech · 946 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (59 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
232.3M
Operations
946
Framework
PyTorch
Recurrent
No
Published
Interspeech (USB) (arXiv 2021)
Cited by
18 (as of 23 October 2026)
Authors
Changhan Wang, Anne Wu, Juan Pino and others
Name in source
speech-encoder-decoder:speech-seq2seq
License
Apache-2.0
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m10116
Graph hash
c47d2ff12c260936c4bcefaa45d6583a870f845a33dbe0b1e0bc5a1a6f4246d1
Skeleton hash
19fce33c710ec079aeebc0fcf13d5591fd0250609a5cd500d217ed175113cebf
Architecture hash
38d94ac8159c9ad5223bde1e74a79c0f0b5296449cc605ca80b6cb512de6c894
Diagram SHA-256
db6a622c995e2271d4ae965efe81f8d42772833a77bb6ef01d3c7a273c49db05
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

Speech Encoder-Decoder is a way of assembling a speech-to-text model from two existing parts: a speech model as the encoder and an autoregressive model as the decoder. It can also be randomly initialized from an encoder config and a decoder config, for instance Wav2Vec2 for the encoder and BERT for the decoder.

The encoder can be any Transformer-based speech model such as Wav2Vec2 or Hubert, and the decoder can be an auto-encoding model such as BERT, a causal language model such as GPT2, or the decoder part of a sequence-to-sequence model. Depending on which decoder is chosen, the cross-attention layers might be randomly initialized. A model initialized from a pretrained encoder and decoder checkpoint needs fine-tuning on a downstream task. At inference the model generates text autoregressively.

The effectiveness of starting such models from pretrained checkpoints was shown, for speech recognition and speech translation, in the paper Large-Scale Self- and Semi-Supervised Learning for Speech Translation. That paper builds its translation model by adding a randomly initialized decoder on top of a wav2vec 2.0 encoder. It reports an improvement of 2.6 BLEU on average over the previous best results on four CoVoST 2 language pairs.

Key idea. The paper improved speech translation on CoVoST 2 with a recipe that combines wav2vec 2.0 pretraining, one iteration of self-training and decoding with a language model.

  • speech encoder decoder
  • speech-encoder-decoder
  • SpeechEncoderDecoderModel
  • speech-to-text
  • speech seq2seq
  • speech translation
  • speech recognition
  • encoder-decoder

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{wang2021largescaleselfsemisupervisedlearning,
      title={Large-Scale Self- and Semi-Supervised Learning for Speech Translation}, 
      author={Changhan Wang and Anne Wu and Juan Pino and Alexei Baevski and Michael Auli and Alexis Conneau},
      year={2021},
      eprint={2104.06678},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2104.06678}, 
}