nam194 commited on
Commit
ab97222
·
verified ·
1 Parent(s): 3fde9aa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -7,6 +7,7 @@ from io import BytesIO
7
  from huggingface_hub import login, hf_hub_download
8
  from piper import PiperVoice
9
  from vinorm import TTSnorm
 
10
  login(os.environ["hf_token"])
11
 
12
  def normalize_vietnamese_text(text):
@@ -22,7 +23,9 @@ def normalize_vietnamese_text(text):
22
  .replace("AI", "Ây Ai")
23
  .replace("A.I", "Ây Ai")
24
  )
25
- return text
 
 
26
 
27
  def synthesize_speech(text, sentence_silence, length_scale, normalize_text=True):
28
  model_path = hf_hub_download(
 
7
  from huggingface_hub import login, hf_hub_download
8
  from piper import PiperVoice
9
  from vinorm import TTSnorm
10
+ from vi_cleaner.vi_cleaner import ViCleaner
11
  login(os.environ["hf_token"])
12
 
13
  def normalize_vietnamese_text(text):
 
23
  .replace("AI", "Ây Ai")
24
  .replace("A.I", "Ây Ai")
25
  )
26
+ text_clean = ViCleaner(text).clean())
27
+ return text_clean
28
+
29
 
30
  def synthesize_speech(text, sentence_silence, length_scale, normalize_text=True):
31
  model_path = hf_hub_download(