Spaces:
Sleeping
Sleeping
Commit
·
52f3cbf
1
Parent(s):
096bc17
fixed lang code
Browse files
app.py
CHANGED
@@ -125,9 +125,7 @@ def get_voice_choices(lang_code):
|
|
125 |
|
126 |
def text_to_audio(text, lang_code, voice, progress=gr.Progress()):
|
127 |
try:
|
128 |
-
audio_data = generate_audio(
|
129 |
-
text, lang_code=lang_code, voice=voice, progress=progress
|
130 |
-
)
|
131 |
return (24000, audio_data) # Return tuple of (sample_rate, audio_data)
|
132 |
except Exception as e:
|
133 |
print(f"Error generating audio: {e}")
|
|
|
125 |
|
126 |
def text_to_audio(text, lang_code, voice, progress=gr.Progress()):
|
127 |
try:
|
128 |
+
audio_data = generate_audio(text, voice=voice, progress=progress)
|
|
|
|
|
129 |
return (24000, audio_data) # Return tuple of (sample_rate, audio_data)
|
130 |
except Exception as e:
|
131 |
print(f"Error generating audio: {e}")
|