update vc code

This commit is contained in:
lyuxiang.lx
2024-09-26 14:46:24 +08:00
parent d52358f6c5
commit 06934c38c7
4 changed files with 11 additions and 16 deletions

View File

@@ -25,7 +25,6 @@ class CosyVoice:
def __init__(self, model_dir, load_jit=True, load_onnx=False):
instruct = True if '-Instruct' in model_dir else False
vc = True if '-VC' in model_dir else False
self.model_dir = model_dir
if not os.path.exists(model_dir):
model_dir = snapshot_download(model_dir)
@@ -37,7 +36,6 @@ class CosyVoice:
'{}/speech_tokenizer_v1.onnx'.format(model_dir),
'{}/spk2info.pt'.format(model_dir),
instruct,
vc,
configs['allowed_special'])
self.model = CosyVoiceModel(configs['llm'], configs['flow'], configs['hift'])
self.model.load('{}/llm.pt'.format(model_dir),