Spaces:
Sleeping
Sleeping
parvezalmuqtadir
commited on
Commit
•
a1e494d
1
Parent(s):
f85fb1d
Update app.py
Browse files
app.py
CHANGED
@@ -89,11 +89,12 @@ def render_file(file):
|
|
89 |
image = Image.frombytes('RGB', [pix.width, pix.height], pix.samples)
|
90 |
return image
|
91 |
|
92 |
-
|
|
|
93 |
def generate_speech(text):
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
|
98 |
def play_sound(file_path):
|
99 |
try:
|
|
|
89 |
image = Image.frombytes('RGB', [pix.width, pix.height], pix.samples)
|
90 |
return image
|
91 |
|
92 |
+
import pyttsx3
|
93 |
+
|
94 |
def generate_speech(text):
|
95 |
+
engine = pyttsx3.init()
|
96 |
+
engine.say(text)
|
97 |
+
engine.runAndWait()
|
98 |
|
99 |
def play_sound(file_path):
|
100 |
try:
|