Requirements: pip install gtts
gtts(Google Text To Speech)
- Initialise the variable for your text ("mytext" line 6 in main.py)
- Initialise the variable for language ("language" line 9 in main.py)
- Create an instance of gTTS class ("myobj" line 12 in main.py)
- Call the method save() and pass the filename that you want as a parameter (line 15 in main.py)
- Play the audio file (line 19 in main.py)
- Initialise the name of your text file ("mytextfile" line 5 in text-file-to-audio.py)
- Initialise the variable for language ("language" line 8 in text-file-to-audio.py)
- Read the contents of your text file and initilise the contents to a variable. ("mytext" line 12 in text-file-to-audio.py)
- Create an instance of gTTS class ("myobj" line 16 in text-file-to-audio.py)
- Call the method save() and pass the filename that you want as a parameter (line 19 in text-file-to-audio.py)
- Play the audio file (line 23 in text-file-to-audio.py)
If you make any changes main.py, please mention it in README.md (this file). A better documentation makes the process of development faster.
Author - Saumitra Jagdale, Vardhaman Kalloli