How do you make text to speech to speak numbers?

People have written apps to spell out numbers in words, including thousands, millions, etc.

Here is one from 2 years ago ...