Spaces:
Runtime error
Runtime error
antoniomae
commited on
Commit
•
b7f9e04
1
Parent(s):
395f3fc
Update app.py
Browse files
app.py
CHANGED
@@ -17,9 +17,9 @@ APP_DESCRIPTION = config['APP_DESCRIPTION']
|
|
17 |
def contains_only_ascii(input_string):
|
18 |
return all(ord(char) < 128 for char in input_string)
|
19 |
|
20 |
-
def create_temp_file(
|
21 |
temp_file = tempfile.NamedTemporaryFile(delete=False)
|
22 |
-
temp_file.write(
|
23 |
return temp_file
|
24 |
|
25 |
def remove_temp_file(temp_file):
|
@@ -38,7 +38,7 @@ st.markdown(APP_DESCRIPTION)
|
|
38 |
input_wav = st.file_uploader("Upload a WAV file with your voice", type=["mp3"])
|
39 |
clone_wav = st.file_uploader("Upload a WAV file with voice to clone", type=["mp3"])
|
40 |
|
41 |
-
if input_mp3 and
|
42 |
progress_bar = st.progress(0)
|
43 |
status_text = st.empty()
|
44 |
|
@@ -69,4 +69,4 @@ if input_mp3 and clone_mp3:
|
|
69 |
|
70 |
st.audio(audio_bytes, format='audio/wav')
|
71 |
|
72 |
-
st.download_button('Download
|
|
|
17 |
def contains_only_ascii(input_string):
|
18 |
return all(ord(char) < 128 for char in input_string)
|
19 |
|
20 |
+
def create_temp_file(input_wav):
|
21 |
temp_file = tempfile.NamedTemporaryFile(delete=False)
|
22 |
+
temp_file.write(input_wav.read())
|
23 |
return temp_file
|
24 |
|
25 |
def remove_temp_file(temp_file):
|
|
|
38 |
input_wav = st.file_uploader("Upload a WAV file with your voice", type=["mp3"])
|
39 |
clone_wav = st.file_uploader("Upload a WAV file with voice to clone", type=["mp3"])
|
40 |
|
41 |
+
if input_mp3 and clone_wav:
|
42 |
progress_bar = st.progress(0)
|
43 |
status_text = st.empty()
|
44 |
|
|
|
69 |
|
70 |
st.audio(audio_bytes, format='audio/wav')
|
71 |
|
72 |
+
st.download_button('Download wav', data=audio_bytes, file_name='output.wav')
|