Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -23,15 +23,11 @@ def text_to_speech(text):
|
|
23 |
audio_array = audio_array.astype(np.int16)
|
24 |
|
25 |
# Save to WAV file
|
26 |
-
|
27 |
-
|
28 |
|
29 |
# Return the path to the WAV file
|
30 |
-
|
31 |
-
|
32 |
-
# Return the audio array directly
|
33 |
-
return audio_array
|
34 |
-
|
35 |
|
36 |
demo = gr.Interface(
|
37 |
text_to_speech,
|
|
|
23 |
audio_array = audio_array.astype(np.int16)
|
24 |
|
25 |
# Save to WAV file
|
26 |
+
output_file = "output.wav"
|
27 |
+
scipy.io.wavfile.write(output_file, rate=model.config.sampling_rate, data=audio_array)
|
28 |
|
29 |
# Return the path to the WAV file
|
30 |
+
return output_file
|
|
|
|
|
|
|
|
|
31 |
|
32 |
demo = gr.Interface(
|
33 |
text_to_speech,
|