Devin Xie commited on
Commit
5ed26b8
·
1 Parent(s): 60a8de0

improved code format

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -12,7 +12,7 @@ def generate_audio(audio_file, text_input):
12
  device = 'cuda' if torch.cuda.is_available() else 'cpu'
13
  tts = TTS(model).to(device)
14
 
15
- tts.tts_to_file(text=text_input, speaker_wav=audio_file, language='en')
16
 
17
  def main():
18
  # Title
@@ -25,7 +25,6 @@ def main():
25
 
26
  # Upload audio file
27
  uploaded_file = st.file_uploader('Add an audio file of the voice you want to clone...', type=['wav'])
28
- st.audio(uploaded_file, format='audio/wav')
29
 
30
  # Input text
31
  text_input = st.text_input('Enter the text to synthesize')
 
12
  device = 'cuda' if torch.cuda.is_available() else 'cpu'
13
  tts = TTS(model).to(device)
14
 
15
+ return tts.tts_to_file(text=text_input, speaker_wav=audio_file, language='en')
16
 
17
  def main():
18
  # Title
 
25
 
26
  # Upload audio file
27
  uploaded_file = st.file_uploader('Add an audio file of the voice you want to clone...', type=['wav'])
 
28
 
29
  # Input text
30
  text_input = st.text_input('Enter the text to synthesize')