I have been using the Google translator app (translate.Google.com) for exactly this purpose. In both the source and target windows of the translator there is a pronunciation icon which when clicked on will pronounce the text entered in either window. Source text in any computer-based document (including pages of web-based text) can be highlighted, copied, and pasted into the translator's source text window. Then the returned translation can be listened to (and mimicked) by repeatedly clicking on the pronunciation icon in the output text window.
For me, an excellent source of web-based content is through the German Wikipedia's "Spoken Text" portal. By highlighting, copying, and pasting paragraphs and pages of these articles I can try to match the pronunciation of a Wikipedia's naturally-spoken article with my translator-generated pronunciations.
Of great value in learning a language by listening to it being spoken using the Google translator is that by repeatedly clicking the pronunciation icon the output speech will be spoken first in a normal, unhurried, way. Then by clicking the icon again the translator's spoken output is spoken much, much slower, and at a speed where each word of the source text is clearly spoken. By toggling and repeating the target language text faster, then slower, one can learn how to pronounce words, phrases, sentences, paragraphs, and even pages of the translated target text.
By toggling the pronunciation icon and speaking along with the translator's voice output to match the output text's pronunciation one can learn how to more or less correctly speak a foreign language by matching the translator's pronunciations.
This "repeat after me" method is a method I have sometimes encountered when using a number of different commercial programs for learning different foreign languages.
I say "more or less correctly" because it is obvious from the cadence and intonation of the Google translator's voice output that it is a computer-generated voice. But obviously, for learning purposes, when one is mimicking the translator's spoken output one's own pronunciation, quickly and then slowly, will eventually be spoken as one would speak in normal conversations.