antoniomae commited on
Commit
5bf4124
1 Parent(s): bb8074d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -35,10 +35,10 @@ st.title(APP_NAME)
35
  st.image(APP_LOGO, use_column_width=True)
36
  st.markdown(APP_DESCRIPTION)
37
 
38
- input_wav = st.file_uploader("Upload a WAV file with your voice", type=["wav"])
39
- clone_wav = st.file_uploader("Upload a WAV file with voice to clone", type=["wav"])
40
 
41
- if input_mp3 and clone_wav:
42
  progress_bar = st.progress(0)
43
  status_text = st.empty()
44
 
@@ -52,7 +52,7 @@ if input_mp3 and clone_wav:
52
  update_progress(0, 'Loading TTS model...')
53
  api = TTS("voice_conversion_models/multilingual/vctk/freevc24")
54
 
55
- update_progress(50, 'Generating wav...')
56
  api.voice_conversion_to_file(
57
  source_wav=temp_input_file.name,
58
  target_wav=temp_clone_file.name,
@@ -69,4 +69,4 @@ if input_mp3 and clone_wav:
69
 
70
  st.audio(audio_bytes, format='audio/wav')
71
 
72
- st.download_button('Download wav', data=audio_bytes, file_name='output.wav')
 
35
  st.image(APP_LOGO, use_column_width=True)
36
  st.markdown(APP_DESCRIPTION)
37
 
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_wav and clone_wav:
42
  progress_bar = st.progress(0)
43
  status_text = st.empty()
44
 
 
52
  update_progress(0, 'Loading TTS model...')
53
  api = TTS("voice_conversion_models/multilingual/vctk/freevc24")
54
 
55
+ update_progress(50, 'Generating audio...')
56
  api.voice_conversion_to_file(
57
  source_wav=temp_input_file.name,
58
  target_wav=temp_clone_file.name,
 
69
 
70
  st.audio(audio_bytes, format='audio/wav')
71
 
72
+ st.download_button('Download MP3', data=audio_bytes, file_name='output.wav')