Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -30,13 +30,13 @@ def text_to_speech(text):
|
|
30 |
#return output_file
|
31 |
|
32 |
# Return the audio array directly
|
33 |
-
return
|
34 |
|
35 |
|
36 |
demo = gr.Interface(
|
37 |
text_to_speech,
|
38 |
gr.Textbox(label="Text to narrate"),
|
39 |
-
gr.Audio(label="Narrated audio"),
|
40 |
title="Text-to-Speech",
|
41 |
description="Enter text to generate audio narration",
|
42 |
)
|
|
|
30 |
#return output_file
|
31 |
|
32 |
# Return the audio array directly
|
33 |
+
return audio_array
|
34 |
|
35 |
|
36 |
demo = gr.Interface(
|
37 |
text_to_speech,
|
38 |
gr.Textbox(label="Text to narrate"),
|
39 |
+
gr.Audio(label="Narrated audio", sample_rate=model.config.sampling_rate),
|
40 |
title="Text-to-Speech",
|
41 |
description="Enter text to generate audio narration",
|
42 |
)
|