ntt123 commited on
Commit
f4d29b7
·
1 Parent(s): acbc346

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
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,