CosyVoice commited on
Commit
282b915
2 Parent(s): 6a3e442 225b56d

Merge pull request #81 from Cxywzx/main

Browse files
Files changed (1) hide show
  1. cosyvoice/cli/frontend.py +4 -1
cosyvoice/cli/frontend.py CHANGED
@@ -114,7 +114,10 @@ class CosyVoiceFrontEnd:
114
  token_min_n=60, merge_len=20,
115
  comma_split=False)]
116
  else:
117
- text = self.en_tn_model.normalize(text)
 
 
 
118
  text = spell_out_number(text, self.inflect_parser)
119
  texts = [i for i in split_paragraph(text, partial(self.tokenizer.encode, allowed_special=self.allowed_special), "en", token_max_n=80,
120
  token_min_n=60, merge_len=20,
 
114
  token_min_n=60, merge_len=20,
115
  comma_split=False)]
116
  else:
117
+ if self.use_ttsfrd:
118
+ text = self.frd.get_frd_extra_info(text, 'input')
119
+ else:
120
+ text = self.en_tn_model.normalize(text)
121
  text = spell_out_number(text, self.inflect_parser)
122
  texts = [i for i in split_paragraph(text, partial(self.tokenizer.encode, allowed_special=self.allowed_special), "en", token_max_n=80,
123
  token_min_n=60, merge_len=20,