Update app.py
Browse files
app.py
CHANGED
|
@@ -12,9 +12,7 @@ async def TextToAudioFile(text: str, model: str) -> str:
|
|
| 12 |
"""Converts text to an audio file and returns its base64 encoded string."""
|
| 13 |
file_path = "main.mp3"
|
| 14 |
|
| 15 |
-
|
| 16 |
-
if os.path.exists(file_path):
|
| 17 |
-
os.remove(file_path)
|
| 18 |
|
| 19 |
# Convert text to audio
|
| 20 |
communicate = edge_tts.Communicate(text, voice=model, pitch='+5Hz', rate='+10%')
|
|
|
|
| 12 |
"""Converts text to an audio file and returns its base64 encoded string."""
|
| 13 |
file_path = "main.mp3"
|
| 14 |
|
| 15 |
+
|
|
|
|
|
|
|
| 16 |
|
| 17 |
# Convert text to audio
|
| 18 |
communicate = edge_tts.Communicate(text, voice=model, pitch='+5Hz', rate='+10%')
|