This Python script allows users to convert text into speech using the gTTS (Google Text-to-Speech) library. It provides an option to either manually input text or upload a text file, and then converts the provided text into an MP3 audio file.
- Text Input Options: Users can choose to input text manually or upload a text file.
- MP3 Conversion: The script converts the text into an MP3 audio file using the
gTTSlibrary. - Error Handling: Handles file read errors and other exceptions gracefully, providing user-friendly feedback.
To run this script, you need the following:
- Python 3.x
gTTSlibrary
You can install the required library using pip:
pip install gTTS