Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -135,7 +135,7 @@ E2TTS_model_cfg = dict(dim=1024, depth=24, heads=16, ff_mult=4)
|
|
| 135 |
# "hf://Gregniuki/F5-tts_English_German_Polish/English/model_222600.pt", "", F5TTS_model_cfg
|
| 136 |
#)
|
| 137 |
F5TTS_ema_model = load_custom(
|
| 138 |
-
"hf://Gregniuki/F5-tts_English_German_Polish/multi3/
|
| 139 |
)
|
| 140 |
#E2TTS_ema_model2 = load_custom(
|
| 141 |
# "hf://Gregniuki/F5-tts_English_German_Polish/Polish/model_500000.pt", "", F5TTS_model_cfg
|
|
@@ -218,10 +218,10 @@ def text_to_ipa(text, language=language):
|
|
| 218 |
)
|
| 219 |
# Remove language markings like (en), (cmn), (de), (pl), (ru)
|
| 220 |
ipa_text = re.sub(r'\([a-z]{2,3}\)', '', ipa_text)
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
|
| 225 |
return ipa_text #preserve_case(text, ipa_text)
|
| 226 |
except Exception as e:
|
| 227 |
print(f"Error processing text: {text}. Error: {e}")
|
|
|
|
| 135 |
# "hf://Gregniuki/F5-tts_English_German_Polish/English/model_222600.pt", "", F5TTS_model_cfg
|
| 136 |
#)
|
| 137 |
F5TTS_ema_model = load_custom(
|
| 138 |
+
"hf://Gregniuki/F5-tts_English_German_Polish/multi3/model_900000.pt", "", F5TTS_model_cfg
|
| 139 |
)
|
| 140 |
#E2TTS_ema_model2 = load_custom(
|
| 141 |
# "hf://Gregniuki/F5-tts_English_German_Polish/Polish/model_500000.pt", "", F5TTS_model_cfg
|
|
|
|
| 218 |
)
|
| 219 |
# Remove language markings like (en), (cmn), (de), (pl), (ru)
|
| 220 |
ipa_text = re.sub(r'\([a-z]{2,3}\)', '', ipa_text)
|
| 221 |
+
ipa_text = re.sub(r'tʃˈaɪniːzlˈe̞tə', '', ipa_text)
|
| 222 |
+
ipa_text = re.sub(r'tʃˈaɪniːzɭˈetə', '', ipa_text)
|
| 223 |
+
ipa_text = re.sub(r'dʒˈapəniːzlˈe̞tə', '', ipa_text)
|
| 224 |
+
ipa_text = re.sub(r'dʒˈapəniːzɭˈetə', '', ipa_text)
|
| 225 |
return ipa_text #preserve_case(text, ipa_text)
|
| 226 |
except Exception as e:
|
| 227 |
print(f"Error processing text: {text}. Error: {e}")
|