This commit is contained in:
lyuxiang.lx
2025-08-21 11:45:36 +08:00
parent dd2d926147
commit 8c96081f94
5 changed files with 13 additions and 6 deletions

View File

@@ -221,7 +221,7 @@ class CosyVoice3(CosyVoice):
self.model = CosyVoice3Model(configs['llm'], configs['flow'], configs['hift'], fp16)
self.model.load('{}/llm.pt'.format(model_dir),
'{}/flow.pt'.format(model_dir),
'{}/bigvgan.pt'.format(model_dir))
'{}/hift.pt'.format(model_dir))
if load_vllm:
self.model.load_vllm('{}/vllm'.format(model_dir))
if load_jit:

View File

@@ -447,7 +447,7 @@ class CosyVoice3Model(CosyVoice2Model):
if speed != 1.0:
assert self.hift_cache_dict[uuid] is None, 'speed change only support non-stream inference mode'
tts_mel = F.interpolate(tts_mel, size=int(tts_mel.shape[2] / speed), mode='linear')
tts_speech, tts_source = self.hift.inference(speech_feat=tts_mel, cache_source=hift_cache_source)
tts_speech, tts_source = self.hift.inference(speech_feat=tts_mel)
if self.hift_cache_dict[uuid] is not None:
tts_speech = fade_in_out(tts_speech, self.hift_cache_dict[uuid]['speech'], self.speech_window)
return tts_speech