Look at
Espeak.
Espeak is an open source speech synthesizer that uses formant synthesis just like say/narrator.device.
There are a number of other ones, such as Festival (which is huge, but there's a trimmed down one called Festival Lite), Mbrola and others that are also available for free and/or open source.