Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -58,7 +58,7 @@ st.markdown(APP_DESCRIPTION)
|
|
| 58 |
|
| 59 |
language = st.selectbox('Select a language', languages)
|
| 60 |
prompt = st.text_input('Enter your prompt')
|
| 61 |
-
input_wav = st.file_uploader("Upload a WAV file", type=["
|
| 62 |
|
| 63 |
if input_wav:
|
| 64 |
if not input_wav or input_wav is None:
|
|
@@ -71,7 +71,7 @@ if input_wav:
|
|
| 71 |
|
| 72 |
current_datetime = datetime.datetime.now()
|
| 73 |
formatted_datetime = current_datetime.strftime("%Y-%m-%d_%H%M%S")
|
| 74 |
-
output_filename = f"recording_{formatted_datetime}.
|
| 75 |
|
| 76 |
temp_file = create_temp_file(input_wav)
|
| 77 |
|
|
@@ -96,6 +96,6 @@ if input_wav:
|
|
| 96 |
|
| 97 |
update_progress(100, 'Audio generated successfully!')
|
| 98 |
|
| 99 |
-
st.audio(audio_bytes, format='audio/
|
| 100 |
|
| 101 |
-
st.download_button('Download
|
|
|
|
| 58 |
|
| 59 |
language = st.selectbox('Select a language', languages)
|
| 60 |
prompt = st.text_input('Enter your prompt')
|
| 61 |
+
input_wav = st.file_uploader("Upload a WAV file", type=["mp3"])
|
| 62 |
|
| 63 |
if input_wav:
|
| 64 |
if not input_wav or input_wav is None:
|
|
|
|
| 71 |
|
| 72 |
current_datetime = datetime.datetime.now()
|
| 73 |
formatted_datetime = current_datetime.strftime("%Y-%m-%d_%H%M%S")
|
| 74 |
+
output_filename = f"recording_{formatted_datetime}.mp3"
|
| 75 |
|
| 76 |
temp_file = create_temp_file(input_wav)
|
| 77 |
|
|
|
|
| 96 |
|
| 97 |
update_progress(100, 'Audio generated successfully!')
|
| 98 |
|
| 99 |
+
st.audio(audio_bytes, format='audio/mp3')
|
| 100 |
|
| 101 |
+
st.download_button('Download mp3', data=audio_bytes, file_name='output.mp3')
|