Devin Xie commited on
Commit
365fc27
·
1 Parent(s): 33bea70

added os to accept coqui TOS

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -23,13 +23,11 @@ if uploaded_file:
23
  # Input text
24
  text_input = st.text_input('Enter the text to synthesize:')
25
 
26
- if st.button('Synthesize'):
27
- if text_input:
28
  try:
29
  output_audio = tts.tts_to_file(text=text_input, speaker_wav=uploaded_file, language='en')
30
 
31
  st.audio(output_audio, format='audio/wav')
32
- except Exception:
33
  st.error('An error occured during synthesis. Please check your input and try again.')
34
- else:
35
- st.error('Please enter some text to synthesize.')
 
23
  # Input text
24
  text_input = st.text_input('Enter the text to synthesize:')
25
 
26
+ if text_input:
27
+ if st.button('Synthesize'):
28
  try:
29
  output_audio = tts.tts_to_file(text=text_input, speaker_wav=uploaded_file, language='en')
30
 
31
  st.audio(output_audio, format='audio/wav')
32
+ except:
33
  st.error('An error occured during synthesis. Please check your input and try again.')