From 8fd8a3a64a02054511fa2538307445296750e239 Mon Sep 17 00:00:00 2001 From: Abhilash Date: Tue, 15 Apr 2025 22:55:02 +0530 Subject: [PATCH] added text to speech feature --- text_to_speech.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 text_to_speech.py diff --git a/text_to_speech.py b/text_to_speech.py new file mode 100644 index 0000000..be257c6 --- /dev/null +++ b/text_to_speech.py @@ -0,0 +1,13 @@ +import pyttsx3 + +engine =pyttsx3.init() +voices= engine.getProperty("voices") +for i in voices: + print(i.id) + print(i.name) + +id ="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Voices\Tokens\TTS_MS_EN-US_DAVID_11.0" +engine.setProperty(i, id) +engine.setProperty("rate",176) +engine.say("hello world") +engine.runAndWait() \ No newline at end of file