stujol wrote:Can espeak read a text document?
I've tried espeak /tmp/testfile.txt
but it just reads the file path, not the contents of the document
From the espeak Usage
To use at the command line, type:
espeak "This is a test"
espeak -f <text file>
Or just type
followed by text on subsequent lines. Each line is spoken when RETURN is pressed.
So you've managed to invoke the first option, and it's speaking the name of the file
Either insert the -f flag before the file name (thus, the second option), or use espeak as a plain command (the third option), and feed the data into it, as Hove is suggesting.
All of these are shell commands (which is what cron commands are written in, although cron isn't a requirement for them), not python.