Spaces:
Running
Running
flavioschneider
commited on
Commit
•
8aa19f9
1
Parent(s):
b5ca01f
fix: return in try statement
Browse files
app.py
CHANGED
@@ -19,11 +19,12 @@ def generate_voice(text, voice_name, model_name, api_key):
|
|
19 |
model=model_name,
|
20 |
api_key=api_key if api_key != '' else None
|
21 |
)
|
|
|
22 |
except UnauthenticatedRateLimitError as e:
|
23 |
raise gr.Error("Thanks for trying out ElevenLabs TTS! You've reached the free tier limit. Please provide an API key to continue.")
|
24 |
except Exception as e:
|
25 |
raise gr.Error(e)
|
26 |
-
|
27 |
|
28 |
badges = """
|
29 |
<div style="display: flex">
|
|
|
19 |
model=model_name,
|
20 |
api_key=api_key if api_key != '' else None
|
21 |
)
|
22 |
+
return (44100, np.frombuffer(pad_buffer(audio), dtype=np.int16))
|
23 |
except UnauthenticatedRateLimitError as e:
|
24 |
raise gr.Error("Thanks for trying out ElevenLabs TTS! You've reached the free tier limit. Please provide an API key to continue.")
|
25 |
except Exception as e:
|
26 |
raise gr.Error(e)
|
27 |
+
|
28 |
|
29 |
badges = """
|
30 |
<div style="display: flex">
|