This script uses Google Translate to do a simple text-to-speech operation. It plays back the result by default when you run it:
python saythis.py "Say this!"
Quotes can be omitted too:
saythis.py Say this!
You can also specify the language:
saythis.py "Pimbas!" --lang pt
Output to a file instead of playing it:
saythis.py "Pimbas!" --lang pt --output pimbas.mp3
This is based on a handy Lifehacker article.
- List available languages
This script is copyright (C) Manufactura Independente 2011-2014.
Published under the terms of the GNU General Public license.