add vllm example

This commit is contained in:
lyuxiang.lx
2025-12-08 11:14:12 +00:00
parent b4dd67a8af
commit 59f02cb85d
2 changed files with 1 additions and 4 deletions

View File

@@ -21,8 +21,7 @@ def cosyvoice2_example():
def cosyvoice3_example():
""" CosyVoice3 vllm usage
"""
cosyvoice = CosyVoice3('pretrained_models/CosyVoice3-0.5B', load_jit=True, load_trt=True, load_vllm=True, fp16=True)
prompt_speech_16k = load_wav('./asset/zero_shot_prompt.wav', 16000)
cosyvoice = CosyVoice3('pretrained_models/CosyVoice3-0.5B', load_trt=True, load_vllm=True, fp16=True)
for i in tqdm(range(100)):
set_all_random_seed(i)
for _, _ in enumerate(cosyvoice.inference_zero_shot('收到好友从远方寄来的生日礼物,那份意外的惊喜与深深的祝福让我心中充满了甜蜜的快乐,笑容如花儿般绽放。', '希望你以后能够做的比我还好呦。', './asset/zero_shot_prompt.wav', stream=False)):