Text-to-speech does the reverse of transcription: it turns written words into audible speech. Older systems stitched together recorded fragments and sounded robotic; modern ones generate the audio waveform directly, producing more natural rhythm and intonation.
The remaining challenges are expression and context, knowing which word to stress or how to read an ambiguous sentence. Good systems also let the pace and tone be adjusted, which matters for accessibility and for anyone who listens rather than reads.