meadevx commited on
Commit
30fa99c
·
verified ·
1 Parent(s): e9cac0e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -23,11 +23,15 @@ def text_to_speech(text):
23
  audio_array = audio_array.astype(np.int16)
24
 
25
  # Save to WAV file
26
- output_file = "output/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,
 
23
  audio_array = audio_array.astype(np.int16)
24
 
25
  # Save to WAV file
26
+ #output_file = "output/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
+ # Return the audio array directly
33
+ return (audio_array, model.config.sampling_rate)
34
+
35
 
36
  demo = gr.Interface(
37
  text_to_speech,