richardorama commited on
Commit
5a5be61
·
verified ·
1 Parent(s): de29661

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -151,6 +151,10 @@ if STATEMENT:
151
  speech = tts(text)
152
  audio_data = speech['audio']
153
  wav_bytes = sf.write(None, audio_data, samplerate=speech['sampling_rate'], format='wav')
 
 
 
 
154
  st.sidebar.download_button(
155
  label="Download Audio",
156
  data=wav_bytes,
 
151
  speech = tts(text)
152
  audio_data = speech['audio']
153
  wav_bytes = sf.write(None, audio_data, samplerate=speech['sampling_rate'], format='wav')
154
+
155
+ with open('output_tts.wav', 'wb') as f:
156
+ f.write(wav_bytes)
157
+
158
  st.sidebar.download_button(
159
  label="Download Audio",
160
  data=wav_bytes,