- python 2.7
In addition, please add the project folder to PYTHONPATH and pip install the following package:
- gTTS
-
This is simple code for Text to Speech in Python.
-
All you need a python in your computer.
-
Move to your file location by using cd command (Example cd Desktop/Text-to-speech).
-
Run the file Text_to_speech.py (python Text_to_speech.py on Terminal).
-
The audio file will be generate on your selected location (Example hello.mp3).
- Edit mytext = 'hello shubham pawar' with your text in Text_to_speech.py file.