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