import pyttsx3 | |
engine = pyttsx3.init('espeak') | |
voices = engine.getProperty('voices') | |
print("Available voices:") | |
for voice in voices: | |
print(f"- {voice.id}") | |
engine.setProperty('voice', voices[29].id) | |
engine.setProperty('rate', 145) # Use the first available voice | |
engine.say("Hi, I AM A DONKEY") | |
engine.runAndWait() | |