espeak is one of the earliest TTS solutions on Linux. However, it’s dated and there is no substantial development or new voices for a while. We found a new TTS solution that uses Google’s speech synthesis system – Simple Google TTS. The tool can read a string or text file or standard input. It needs an internet connection to connect to the Google service. More than 100 languages are supported. Simple Google TTS can also work offline using pico2wave. This option supports only 5 languages though. There are some other limitations for using unofficial Google TTS API’s as well, e.g. CAPTCHA input for overly frequent requests.
Installation on Ubuntu
- Install the dependencies
$ sudo apt-get install xsel libnotify-bin libttspico0 libttspico-utils libttspico-data libwww-perl libwww-mechanize-perl libhtml-tree-perl sox libsox-fmt-mp3
- Clone the Git repository
$ git clone https://github.com/Glutanimate/simple-google-tts.git
- The executable is simple-google-tts within the directory of the same name.
- The command syntax is
- Read a string in English
$ simple_google_tts en "Hello World"
- To read a file, use
$ simple_google_tts en /path_to_file/readfile.txt
- Two useful options:
-p: use offline TTS (pico2wave) instead of Google's TTS system -g: activate gui notifications (via notify-send)
Webpage: Simple Google TTS