Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -92,9 +92,9 @@ async def generate_speech_async(text: str, voice: str, pitch: str, rate: str, ou
|
|
| 92 |
"""Generate speech asynchronously"""
|
| 93 |
try:
|
| 94 |
# Create SSML with pitch and rate adjustments
|
| 95 |
-
ssml_text = f'<speak><prosody pitch="{pitch}" rate="{rate}">{text}</prosody></speak>'
|
| 96 |
|
| 97 |
-
communicate = edge_tts.Communicate(
|
| 98 |
await communicate.save(output_file)
|
| 99 |
return True
|
| 100 |
except Exception as e:
|
|
|
|
| 92 |
"""Generate speech asynchronously"""
|
| 93 |
try:
|
| 94 |
# Create SSML with pitch and rate adjustments
|
| 95 |
+
# ssml_text = f'<speak><prosody pitch="{pitch}" rate="{rate}">{text}</prosody></speak>'
|
| 96 |
|
| 97 |
+
communicate = edge_tts.Communicate(text = text, voice = voice, rate = rate, pitch = pitch)
|
| 98 |
await communicate.save(output_file)
|
| 99 |
return True
|
| 100 |
except Exception as e:
|