mirror of
https://github.com/FunAudioLLM/CosyVoice.git
synced 2026-02-04 17:39:25 +08:00
FIX: 修复自然语言控制生成音频时发生错误,异常信息如下:AttributeError: 'CosyVoiceFrontEnd' object has no attribute 'en_tn_model'
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user