Skip to content

Commit

Permalink
🐛 fix infer func
Browse files Browse the repository at this point in the history
  • Loading branch information
zhzLuke96 committed Jun 20, 2024
1 parent de66e6b commit b0de527
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions modules/ChatTTS/ChatTTS/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,22 +294,16 @@ def infer(
params_refine_text={},
params_infer_code={"prompt": "[speed_5]"},
use_decoder=True,
do_text_normalization=True,
lang=None,
stream=False,
do_homophone_replacement=True,
):
res_gen = self._infer(
text,
skip_refine_text,
refine_text_only,
params_refine_text,
params_infer_code,
use_decoder,
do_text_normalization,
lang,
stream,
do_homophone_replacement,
text=text,
skip_refine_text=skip_refine_text,
refine_text_only=refine_text_only,
params_refine_text=params_refine_text,
params_infer_code=params_infer_code,
use_decoder=use_decoder,
stream=stream,
)
if stream:
return res_gen
Expand All @@ -318,7 +312,7 @@ def infer(

def refiner_prompt(self, text, params_refine_text={}, stream=False):
return self.infer(
text,
text=text,
skip_refine_text=False,
refine_text_only=True,
params_refine_text=params_refine_text,
Expand Down

0 comments on commit b0de527

Please sign in to comment.