All models

torchaudio.models.Tacotron2-phone

Text-to-mel-spectrogram front end of Tacotron 2, traced in torchaudio, SpeechBrain and ESPnet builds.

Audio and speech · 4,045 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

This diagram has 4,045 operations (347 KB) and is drawn when you ask.

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
28.2M
Operations
4,045
Framework
PyTorch
Recurrent
Yes
Published
ICASSP 2018
Cited by
2,744 (as of 18 October 2026)
Authors
Jonathan Shen, Ruoming Pang, Ron J. Weiss and others
License
BSD-3-Clause
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
m10582
Graph hash
0c54f4d60cbffd450251724b0319f41d24c7216d6e02e938b063cb09412c8e47
Skeleton hash
3e7dc6cad7af9223bad198364fb2d5cdf2be89ef4a61559fa61fb2cd0fcb07fc
Architecture hash
ded21c9f2aeaa63ef084094563a14ac334ee36e1a8ba0023febb2eee534577b1
Diagram SHA-256
b669e9ba7ffa9d3681fa210289b0b6e10c60edc30993895aecf650ad3b9b6874
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

About this model's family

Tacotron 2 is a neural network architecture for speech synthesis directly from text. The system has two stages: a recurrent sequence-to-sequence feature prediction network that maps character embeddings to mel-scale spectrograms, followed by a modified WaveNet acting as a vocoder to turn those spectrograms into waveforms. It achieves a mean opinion score of 4.53, comparable to 4.58 for professionally recorded speech.

The paper's ablations evaluate using mel spectrograms as WaveNet's input instead of linguistic, duration and F0 features. The authors further show that this compact acoustic intermediate representation enables significant simplification of the WaveNet architecture.

ESPnet's configuration for training Tacotron 2 uses a 512-dimensional character or phoneme embedding in front of a one-layer BLSTM encoder of 512 units. The decoder stacks two LSTM layers of 1024 units. A postnet of five layers with 512 channels refines the output. Compared to the original paper, ESPnet's configuration additionally uses a guided attention loss to accelerate learning of the diagonal attention. That recipe needs only a single GPU with 12 GB memory and takes about 3 days to train on a Titan V.

Key idea. Tacotron 2 shows that a sequence-to-sequence network predicting mel spectrograms, feeding a modified WaveNet vocoder, yields speech with a mean opinion score of 4.53 against 4.58 for professionally recorded speech.

  • Tacotron 2
  • Tacotron2
  • text-to-speech
  • TTS
  • mel spectrogram
  • speech synthesis
  • torchaudio Tacotron2
  • ESPnet tacotron2
  • SpeechBrain Tacotron2
  • WaveNet vocoder
  • sequence-to-sequence TTS

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

Cite the paper

@misc{shen2018naturalttssynthesisconditioning,
      title={Natural TTS Synthesis by Conditioning WaveNet on Mel Spectrogram Predictions}, 
      author={Jonathan Shen and Ruoming Pang and Ron J. Weiss and Mike Schuster and Navdeep Jaitly and Zongheng Yang and Zhifeng Chen and Yu Zhang and Yuxuan Wang and RJ Skerry-Ryan and Rif A. Saurous and Yannis Agiomyrgiannakis and Yonghui Wu},
      year={2018},
      eprint={1712.05884},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/1712.05884}, 
}