richardorama
commited on
Update app.py
Browse files
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,
|