Speech & Audio AI Lab

Interactive labs for speech recognition, speech synthesis, and audio in general: in-browser DSP experiments, algorithms, datasets, and a learning path, without storing any recording.

43experiments

Speech Synthesis

Text-to-Speech (TTS)

Intermediate16 minStage 5

Learning Objectives

  • Explain the TTS pipeline from text to waveform
  • Distinguish the acoustic model from the vocoder
  • Explain the problem of diacritizing Arabic text before synthesis

Text-to-speech (TTS) converts text into an audio signal. The common pipeline has two stages: an acoustic model that converts text into a mel spectrogram, then a vocoder that converts the spectrogram into a waveform. Examples of the former: Tacotron 2 and FastSpeech 2, and of the latter: WaveNet and HiFi-GAN. There are also models that combine both stages end to end, such as VITS.

The text goes through a normalization stage that converts numbers, symbols, and abbreviations into spoken words, and then into phonemes or characters. In Arabic, the diacritization issue has a direct effect: the same undiacritized word can have more than one pronunciation. So systems need automatic diacritization or diacritized text for the pronunciation to be correct.

The number of spectrogram frames is proportional to the speech duration. At 16000 Hz and a hop of 256 samples, each second gives 62.5 frames, and this illustrates why the model must predict the duration of each phonetic unit, which is what FastSpeech 2 does explicitly.

Measuring quality is difficult because it is inherently subjective: listener evaluations and approximate metrics are used. The technology carries ethical risks when cloning a person's voice without their permission, so consent must be obtained and synthesized audio must be labeled. In the Lab you can try synthesis through the browser's service, while neural models require an external tool.

References

  1. Shen et al.. Natural TTS Synthesis by Conditioning WaveNet on Mel Spectrogram Predictions. arXiv (2017). DOI
  2. Ren et al.. FastSpeech 2: Fast and High-Quality End-to-End Text to Speech. arXiv (2020). DOI
  3. Kim et al.. Conditional Variational Autoencoder with Adversarial Learning for End-to-End Text-to-Speech. arXiv (2021). DOI
  4. Kong et al.. HiFi-GAN: Generative Adversarial Networks for Efficient and High Fidelity Speech Synthesis. arXiv (2020). DOI

Audio processing in the experiments takes place inside your browser. Audio, texts, and conversations are not saved on the server. Privacy Policy