📜 ⬆️ ⬇️

A simple text-to-speech converter using Google Translate


Recently, Google has updated the Russian language in Google Translate , greatly improving the pronunciation.
I decided to make a text-to-speech converter based on their translator.

Now we can create mp3s from text right on the command line:
echo   | gtts > hello.mp3 

Result (http://goo.gl/kRued)

You can set accents by typing in front of the desired plus or apostrophe
 echo "' '" | gtts > hello2.mp3 

Result (http://goo.gl/aIwNZ)

Poems are read quite well (http://goo.gl/yYqq7), only accents need to be affixed.
')
How to install:
- If you have setuptools - easy_install gtexttospeech
- If you have pip - pip install gtexttospeech
- You can manually, also through setuptools - you need to download the sources pypi.python.org/pypi/gtexttospeech and run python setup.py install

The default script is installed in / usr / local / bin / (I didn’t find how to auto-select in setuptools), so if you want to put a binary (gtts) in another place, you just need to specify it during installation.
 python setup.py install --install-scripts /usr/bin/ 


Development of the project is conducted on github .

Source: https://habr.com/ru/post/115091/


All Articles