From 225b56de052ad53afa6ca84612cd6da2e5d6d298 Mon Sep 17 00:00:00 2001 From: cyz Date: Wed, 10 Jul 2024 12:02:41 +0800 Subject: [PATCH] =?UTF-8?q?FIX:=20=E4=BF=AE=E5=A4=8D=E8=87=AA=E7=84=B6?= =?UTF-8?q?=E8=AF=AD=E8=A8=80=E6=8E=A7=E5=88=B6=E7=94=9F=E6=88=90=E9=9F=B3?= =?UTF-8?q?=E9=A2=91=E6=97=B6=E5=8F=91=E7=94=9F=E9=94=99=E8=AF=AF=EF=BC=8C?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E4=BF=A1=E6=81=AF=E5=A6=82=E4=B8=8B=EF=BC=9A?= =?UTF-8?q?AttributeError:=20'CosyVoiceFrontEnd'=20object=20has=20no=20att?= =?UTF-8?q?ribute=20'en=5Ftn=5Fmodel'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cosyvoice/cli/frontend.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cosyvoice/cli/frontend.py b/cosyvoice/cli/frontend.py index d2983b7..0fb9ca9 100644 --- a/cosyvoice/cli/frontend.py +++ b/cosyvoice/cli/frontend.py @@ -114,7 +114,10 @@ class CosyVoiceFrontEnd: token_min_n=60, merge_len=20, comma_split=False)] else: - text = self.en_tn_model.normalize(text) + if self.use_ttsfrd: + text = self.frd.get_frd_extra_info(text, 'input') + else: + text = self.en_tn_model.normalize(text) text = spell_out_number(text, self.inflect_parser) texts = [i for i in split_paragraph(text, partial(self.tokenizer.encode, allowed_special=self.allowed_special), "en", token_max_n=80, token_min_n=60, merge_len=20,