TADBot / Output.py
ryefoxlime's picture
Raspberry pi codes
6e9c870
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()