You can put any sentence or piece of text in a language you're learning into programs and they will read it out for you in that language. They do not always sound entirely natural, and they seem to read seems texts better than others, but they do give you a good idea of how the text should sound. You could also make recordings while the programs are reading your texts and listen to them as many times as you want.
The recordings provided with many language courses don't necessarily include all the text in the course, but with text-to-speech programs you can fill the gaps. You can also use any other texts you find and hear them spoken, which is helpful, especially if you're learning a language with a different writing system such as Chinese, Japanese, or Arabic. I find it useful to read texts in foreign language aloud, and if I have a recording of the text, it's even more useful to listen that as I'm reading.
Another thing you do with text-to-speech programs is to put in a text in one language, and to have the program to read it out in a different language. This doesn't help with your language learning, but is just a bit of fun.