Spaces:
Sleeping
Sleeping
Commit
·
621208b
1
Parent(s):
5e88240
Update app.py
Browse files
app.py
CHANGED
@@ -27,16 +27,12 @@ except (BotoCoreError, ClientError) as error:
|
|
27 |
print('Error: ', error)
|
28 |
|
29 |
def speak_text(text):
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
pass
|
37 |
-
engine.startLoop()
|
38 |
-
engine.setProperty('rate', 185)
|
39 |
-
engine.say(text)
|
40 |
|
41 |
|
42 |
|
|
|
27 |
print('Error: ', error)
|
28 |
|
29 |
def speak_text(text):
|
30 |
+
# Specify the text to be converted to speech
|
31 |
+
text = "Hello, this is an example of using the built-in `espeak-ng` command for text-to-speech conversion on Linux."
|
32 |
+
|
33 |
+
# Use the `espeak-ng` command to convert the text to speech and play it
|
34 |
+
os.system(f"espeak-ng '{text}'")
|
35 |
+
|
|
|
|
|
|
|
|
|
36 |
|
37 |
|
38 |
|