Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -61,6 +61,15 @@ if uploaded_file is not None:
|
|
| 61 |
st.subheader("Listen to the Speech")
|
| 62 |
st.audio(temp_file_path, format="audio/mp3")
|
| 63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
# Clean up the temporary file after use
|
| 65 |
os.remove(temp_file_path)
|
| 66 |
|
|
|
|
| 61 |
st.subheader("Listen to the Speech")
|
| 62 |
st.audio(temp_file_path, format="audio/mp3")
|
| 63 |
|
| 64 |
+
# Add download button
|
| 65 |
+
with open(temp_file_path, "rb") as audio_file:
|
| 66 |
+
st.download_button(
|
| 67 |
+
label="Download MP3",
|
| 68 |
+
data=audio_file,
|
| 69 |
+
file_name="output_audio.mp3",
|
| 70 |
+
mime="audio/mp3"
|
| 71 |
+
)
|
| 72 |
+
|
| 73 |
# Clean up the temporary file after use
|
| 74 |
os.remove(temp_file_path)
|
| 75 |
|