Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -93,11 +93,9 @@ def ui():
|
|
93 |
|
94 |
with container:
|
95 |
with st.form(key='my_form', clear_on_submit=True):
|
96 |
-
audio_file =
|
97 |
-
wav_file = open("./output_audio.mp3", "wb")
|
98 |
-
wav_file.write(audio_file.tobytes())
|
99 |
submit_button = st.form_submit_button(label='Send')
|
100 |
-
if submit_button :
|
101 |
output_file_path = "./output_audio.mp3"
|
102 |
# save_uploaded_file_as_mp3(audio_file,output_file_path )
|
103 |
hindi_input_audio,sample_rate=torchaudio.load(output_file_path)
|
|
|
93 |
|
94 |
with container:
|
95 |
with st.form(key='my_form', clear_on_submit=True):
|
96 |
+
audio_file = st.file_uploader("Upload an audio file that needs to be cloned", type=[ "wav,Mp4","Mp3"])
|
|
|
|
|
97 |
submit_button = st.form_submit_button(label='Send')
|
98 |
+
if audio_file is not None and submit_button :
|
99 |
output_file_path = "./output_audio.mp3"
|
100 |
# save_uploaded_file_as_mp3(audio_file,output_file_path )
|
101 |
hindi_input_audio,sample_rate=torchaudio.load(output_file_path)
|