Pendrokar commited on
Commit
412be8a
·
verified ·
1 Parent(s): 9f9c4e7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -84,8 +84,10 @@ def generate_first(text, voice='af_heart', speed=1, use_gpu=CUDA_AVAILABLE, lang
84
 
85
  # Convert text to IPA if not English
86
  if lang != 'en-us':
87
- text = goruut_phonemize(text, lang, False, False)
88
- # text = text_to_ipa(text, lang)
 
 
89
 
90
  pipeline = pipelines[voice[0]]
91
  pack = pipeline.load_voice(voice)
 
84
 
85
  # Convert text to IPA if not English
86
  if lang != 'en-us':
87
+ if (PYGORUUT_AVAILABLE):
88
+ text = goruut_phonemize(text, lang, False, False)
89
+ else:
90
+ text = text_to_ipa(text, lang)
91
 
92
  pipeline = pipelines[voice[0]]
93
  pack = pipeline.load_voice(voice)