Spaces:
Running
Running
Devin Xie
commited on
Commit
·
350cb58
1
Parent(s):
aad4adb
changed formatting of file upload and text input
Browse files
app.py
CHANGED
@@ -16,16 +16,14 @@ st.title('Voice Cloning')
|
|
16 |
|
17 |
# Upload audio file
|
18 |
uploaded_file = st.file_uploader('Add an audio file of the voice you want to clone...', type=['wav'])
|
|
|
19 |
|
20 |
-
|
21 |
-
|
22 |
|
23 |
-
|
24 |
-
|
|
|
25 |
|
26 |
-
|
27 |
-
if st.button('Synthesize'):
|
28 |
-
output_audio = tts.tts_to_file(text=text_input, speaker_wav=uploaded_file, language='en')
|
29 |
-
|
30 |
-
st.audio(output_audio, format='audio/wav')
|
31 |
|
|
|
16 |
|
17 |
# Upload audio file
|
18 |
uploaded_file = st.file_uploader('Add an audio file of the voice you want to clone...', type=['wav'])
|
19 |
+
st.audio(uploaded_file, format='audio/wav')
|
20 |
|
21 |
+
# Input text
|
22 |
+
text_input = st.text_input('Enter the text to synthesize:')
|
23 |
|
24 |
+
if uploaded_file is not None and text_input is not "":
|
25 |
+
if st.button('Synthesize'):
|
26 |
+
output_audio = tts.tts_to_file(text=text_input, speaker_wav=uploaded_file, language='en')
|
27 |
|
28 |
+
st.audio(output_audio, format='audio/wav')
|
|
|
|
|
|
|
|
|
29 |
|