8
spk_stat = torch.load('./asset/spk_stat.pt')
spk = torch.randn(768) * spk_stat.chunk(2)[0] + spk_stat.chunk(2)[1]
params_infer_code = ChatTTS.Chat.InferCodeParams(
spk_emb=spk, # add sampled speaker
temperature=.3, # using custom temperature
top_P=0.7, # top P decode
top_K=20, # top K decode
)
params_refine_text = ChatTTS.Chat.RefineTextParams( prompt='[oral_2][laugh_0][break_6]', )
logger.info("Start inference.")
wavs = chat.infer(
texts,
stream,
params_infer_code = params_infer_code,
params_refine_text=params_refine_text,
use_decoder=True,
)
之前总是一种很低沉很慢速的音色,想改却没效果。我的代码如上所示,但是不起作用,请问我有哪里写错了吗?