Spaces:
Sleeping
Sleeping
binqiangliu
commited on
Commit
•
43a9c3d
1
Parent(s):
3761bae
Update app.py
Browse files
app.py
CHANGED
@@ -6,8 +6,8 @@
|
|
6 |
|
7 |
import gradio as gr
|
8 |
import openai
|
9 |
-
import
|
10 |
-
|
11 |
#from gtts import gTTS
|
12 |
#import pydantic
|
13 |
|
@@ -56,9 +56,9 @@ def transcribe(audio):
|
|
56 |
|
57 |
|
58 |
# Text to speech
|
59 |
-
engine =
|
60 |
# engine = pyttsx3.init('espeak')
|
61 |
-
|
62 |
engine.setProperty("rate", 150)
|
63 |
engine.setProperty("voice", "english-us")
|
64 |
engine.save_to_file(system_message, "response.mp3")
|
|
|
6 |
|
7 |
import gradio as gr
|
8 |
import openai
|
9 |
+
import pyttsx3
|
10 |
+
import python-espeak
|
11 |
#from gtts import gTTS
|
12 |
#import pydantic
|
13 |
|
|
|
56 |
|
57 |
|
58 |
# Text to speech
|
59 |
+
engine = pyttsx3.init()
|
60 |
# engine = pyttsx3.init('espeak')
|
61 |
+
# engine.setProperty('engine', 'gTTS')
|
62 |
engine.setProperty("rate", 150)
|
63 |
engine.setProperty("voice", "english-us")
|
64 |
engine.save_to_file(system_message, "response.mp3")
|