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.
