Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -14,6 +14,9 @@ def download_assets():
|
|
14 |
os.system("wget https://raw.githubusercontent.com/NTT123/vietTTS/master/assets/infore/lexicon.txt")
|
15 |
|
16 |
def text_to_speech(text):
|
|
|
|
|
|
|
17 |
text = nat_normalize_text(text)
|
18 |
mel = text2mel(
|
19 |
text,
|
|
|
14 |
os.system("wget https://raw.githubusercontent.com/NTT123/vietTTS/master/assets/infore/lexicon.txt")
|
15 |
|
16 |
def text_to_speech(text):
|
17 |
+
# prevent too long text
|
18 |
+
if len(text) > 100:
|
19 |
+
text = text[:100]
|
20 |
text = nat_normalize_text(text)
|
21 |
mel = text2mel(
|
22 |
text,
|