Spaces:
Running
Running
Update app.py
Browse files
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 |
-
|
| 88 |
-
|
|
|
|
|
|
|
| 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)
|