This commit is contained in:
lyuxiang.lx
2025-01-23 11:27:10 +08:00
parent 49761d2474
commit c6c3f27ecc

View File

@@ -151,7 +151,7 @@ def text_generator():
yield '那份意外的惊喜与深深的祝福' yield '那份意外的惊喜与深深的祝福'
yield '让我心中充满了甜蜜的快乐,' yield '让我心中充满了甜蜜的快乐,'
yield '笑容如花儿般绽放。' yield '笑容如花儿般绽放。'
for i, j in enumerate(cosyvoice.inference_zero_shot(text_generator, '希望你以后能够做的比我还好呦。', prompt_speech_16k, stream=False)): for i, j in enumerate(cosyvoice.inference_zero_shot(text_generator(), '希望你以后能够做的比我还好呦。', prompt_speech_16k, stream=False)):
torchaudio.save('zero_shot_{}.wav'.format(i), j['tts_speech'], cosyvoice.sample_rate) torchaudio.save('zero_shot_{}.wav'.format(i), j['tts_speech'], cosyvoice.sample_rate)
``` ```