chat-tts / tool /normalizer /normali_util.py
chenjgtea
gpu模式下新增中英文的normal花处理
f097912
raw
history blame contribute delete
469 Bytes
from typing import Callable
from functools import partial
def normalizer_en_nemo_text() -> Callable[[str], str]:
from nemo_text_processing.text_normalization.normalize import Normalizer
return partial(
Normalizer(input_case="cased", lang="en").normalize,
verbose=False,
punct_post_process=True,
)
def normalizer_cn_tn() -> Callable[[str], str]:
from tn.chinese.normalizer import Normalizer
return Normalizer().normalize