This Python script utilizes the pyttsx3
library to create a simple Text-to-Speech (TTS) program. The program allows customization of speech output by providing parameters such as text, speech rate, volume, and voice gender.
- Text-to-Speech functionality
- Adjustable speech rate and volume
- Selection of voice gender
-
Clone the repository:
git clone https://github.com/yourusername/text-to-speech.git
-
Install required dependencies:
pip install pyttsx3
-
Run the program:
python text_to_speech.py
# Example usage
SpeakText("Hello, world!", 1, 1, 0)
- command: The text to be converted to speech.
- Rate: Adjustment to the speech rate.
- Volume: Volume level of the speech.
- Gender: Voice gender index (0 for male, 1 for female).
This project is licensed under the MIT License - see the LICENSE file for details.
I hope you find this helpful! Happy coding!