Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

生成的音频与文本对不上 #829

Open
fanlu opened this issue Jan 3, 2025 · 0 comments
Open

生成的音频与文本对不上 #829

fanlu opened this issue Jan 3, 2025 · 0 comments

Comments

@fanlu
Copy link

fanlu commented Jan 3, 2025

Describe the bug
使用inference_cross_lingual(没有prompt text)时,生成的音频有概率与文本对不上

To Reproduce

from cosyvoice.cli.cosyvoice import CosyVoice, CosyVoice2
from cosyvoice.utils.file_utils import load_wav
import torchaudio
cosyvoice = CosyVoice2('pretrained_models/CosyVoice2-0.5B', load_jit=True, load_onnx=False, load_trt=False)
prompt_wav = "/mnt/cfs1/asr/database/AM/aishell2/IOS/wav/C0649/IC0649W0359.wav"
prompt_speech_16k = load_wav(prompt_wav, 16000)
for i, j in enumerate(cosyvoice.inference_cross_lingual("嗯。", prompt_speech_16k, stream=False)):
    torchaudio.save('error_{}.wav'.format(i), j['tts_speech'], cosyvoice.sample_rate)

prompt 音频为aishell2中的数据/mnt/cfs1/asr/database/AM/aishell2/IOS/wav/C0649/IC0649W0359.wav

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant