Spaces:
Sleeping
Sleeping
kevinwang676
commited on
Commit
•
0744265
1
Parent(s):
8828a54
Update app.py
Browse files
app.py
CHANGED
@@ -72,9 +72,10 @@ def generate_voice(text, voice_name):
|
|
72 |
voice=voice_name,
|
73 |
model="eleven_multilingual_v2"
|
74 |
)
|
75 |
-
|
76 |
-
|
77 |
-
return
|
|
|
78 |
except UnauthenticatedRateLimitError as e:
|
79 |
raise gr.Error("Thanks for trying out ElevenLabs TTS! You've reached the free tier limit. Please provide an API key to continue.")
|
80 |
except Exception as e:
|
|
|
72 |
voice=voice_name,
|
73 |
model="eleven_multilingual_v2"
|
74 |
)
|
75 |
+
with open("output" + ".mp3", mode='wb') as f:
|
76 |
+
f.write(audio)
|
77 |
+
return "output.mp3"
|
78 |
+
|
79 |
except UnauthenticatedRateLimitError as e:
|
80 |
raise gr.Error("Thanks for trying out ElevenLabs TTS! You've reached the free tier limit. Please provide an API key to continue.")
|
81 |
except Exception as e:
|