File size: 295 Bytes
6e9c870 |
1 2 3 4 5 6 7 8 9 10 11 |
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[14].id) # Use the first available voice
engine.say("Hello from Raspberry Pi")
engine.runAndWait()
|