Spaces:
Configuration error
Configuration error
Merge branch 'main' of github.com:FunAudioLLM/CosyVoice into main
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
|
| 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,
|