:Speech synthesis:

Pronunciation ˈsɪnθəsɪs

The artificial production of human speech by mechanical or electronic means.

Very early attempts at making a talking machine were of course mechanical. A good example is Von Kempelen’s Speaking Machine.

More recently hardware machines like the Haskins Pattern Playback were used to make important contributions to the study of speech perception.

These days speech synthesis is performed by software and there are many competing systems. A good overview of these can be found on this Wikipedia page.