Installing the module :
~ git clone https://github.com/gabriel-dahan/textconverter/
~ cd textconverter/
# Linux / MacOS
~ python3 -m pip install -U .
# Windows
~ py -3 -m pip install -U .
Consider using the --user
parameter if you're not a root/admin user.
Importing the module :
from textconverter import TextConverter
tc = TextConverter('Some text...')
# or
tc = TextConverter(open('somefile.txt'))
tc.toaudiofile('speech.mp3')
# If the text is in another language (than english), you must specify the lang as a parameter :
tc.toaudiofile('speech.mp3', lang = 'fr') # For example
tc = TextConverter('...')
tc.speech()
# or
tc.speech(lang = '...')