Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -127,9 +127,9 @@ async def respond(audio):
|
|
| 127 |
await communicate.save(tmp_path)
|
| 128 |
yield tmp_path
|
| 129 |
|
| 130 |
-
async def generate1(
|
| 131 |
voice = Female_language_dict.get("English (UK)-Sonia- (Female)", "default_voice")
|
| 132 |
-
communicate = edge_tts.Communicate(
|
| 133 |
with tempfile.NamedTemporaryFile(delete=False, suffix=".wav") as tmp_file:
|
| 134 |
tmp_path = tmp_file.name
|
| 135 |
await communicate.save(tmp_path)
|
|
|
|
| 127 |
await communicate.save(tmp_path)
|
| 128 |
yield tmp_path
|
| 129 |
|
| 130 |
+
async def generate1(UserPrompt, TextPrompt ):
|
| 131 |
voice = Female_language_dict.get("English (UK)-Sonia- (Female)", "default_voice")
|
| 132 |
+
communicate = edge_tts.Communicate(TextPrompt, voice)
|
| 133 |
with tempfile.NamedTemporaryFile(delete=False, suffix=".wav") as tmp_file:
|
| 134 |
tmp_path = tmp_file.name
|
| 135 |
await communicate.save(tmp_path)
|