diff --git a/README.md b/README.md index 2a2878a..870f853 100644 --- a/README.md +++ b/README.md @@ -69,8 +69,6 @@ ``` sh conda create -n cosyvoice -y python=3.10 conda activate cosyvoice - # pynini is required by WeTextProcessing, use conda to install it as it can be executed on all platforms. - conda install -y -c conda-forge pynini==2.1.5 pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host=mirrors.aliyun.com # If you encounter sox compatibility issues @@ -106,7 +104,7 @@ git clone https://www.modelscope.cn/iic/CosyVoice-ttsfrd.git pretrained_models/C Optionally, you can unzip `ttsfrd` resource and install `ttsfrd` package for better text normalization performance. -Notice that this step is not necessary. If you do not install `ttsfrd` package, we will use WeTextProcessing by default. +Notice that this step is not necessary. If you do not install `ttsfrd` package, we will use wetext by default. ``` sh cd pretrained_models/CosyVoice-ttsfrd/ diff --git a/cosyvoice/cli/frontend.py b/cosyvoice/cli/frontend.py index 36dcd18..f98b0d6 100644 --- a/cosyvoice/cli/frontend.py +++ b/cosyvoice/cli/frontend.py @@ -28,9 +28,9 @@ try: import ttsfrd use_ttsfrd = True except ImportError: - print("failed to import ttsfrd, use WeTextProcessing instead") - from tn.chinese.normalizer import Normalizer as ZhNormalizer - from tn.english.normalizer import Normalizer as EnNormalizer + print("failed to import ttsfrd, use wetext instead") + from wetext import Normalizer as ZhNormalizer + from wetext import Normalizer as EnNormalizer use_ttsfrd = False from cosyvoice.utils.file_utils import logging from cosyvoice.utils.frontend_utils import contains_chinese, replace_blank, replace_corner_mark, remove_bracket, spell_out_number, split_paragraph, is_only_punctuation @@ -68,7 +68,7 @@ class CosyVoiceFrontEnd: 'failed to initialize ttsfrd resource' self.frd.set_lang_type('pinyinvg') else: - self.zh_tn_model = ZhNormalizer(remove_erhua=False, full_to_half=False, overwrite_cache=True) + self.zh_tn_model = ZhNormalizer(remove_erhua=False) self.en_tn_model = EnNormalizer() self.inflect_parser = inflect.engine() diff --git a/requirements.txt b/requirements.txt index fe48b20..782c1f7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -36,5 +36,5 @@ torch==2.3.1 torchaudio==2.3.1 transformers==4.40.1 uvicorn==0.30.0 -WeTextProcessing==1.0.3 +wetext==0.0.4 wget==3.2