CosyVoice icon indicating copy to clipboard operation
CosyVoice copied to clipboard

中文转日文音频

Open Anmidy opened this issue 1 year ago • 5 comments

你好,我想输入中文,得到日文音频,我用以下方法尝试,音频生成结果并不是日文,仍然是中文,请问需要怎么修改? `
cosyvoice = CosyVoice('pretrained_models/CosyVoice-300M') prompt_speech_22k = load_wav('../../cross_lingual_jp.wav', 22050) for i, j in enumerate(cosyvoice.inference_cross_lingual('<|zh|>早上好。', prompt_speech_22k, stream=False)): torchaudio.save('cross_lingual_zh2jp.wav'.format(i), j['tts_speech'], 22050)

` cross_lingual_jp.wav 音频文件,是日文的“早上好”

Anmidy avatar Sep 12 '24 12:09 Anmidy

change <|zh|>早上好。' to '<|jp|> some janpanese character'

aluminumbox avatar Sep 12 '24 15:09 aluminumbox

cross_lingual_zh2jp.zip @aluminumbox thanks for your remind, I know the result is correct if i set text like this: <|jp|>おはようございます,but I want transform chinese to japanese audio, then what should I do?

Anmidy avatar Sep 13 '24 03:09 Anmidy

@aluminumbox Is it means that the function inference_cross_lingual can not translate chinese text to japanese audio? Only supports Japanese text to Japanese audio translation?

Anmidy avatar Sep 14 '24 03:09 Anmidy

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Oct 15 '24 02:10 github-actions[bot]

输入“<|jp|>4、5、6、7、8”,输出音频是英文。阿拉伯数字怎么指定输出日语呢?

madasta avatar Oct 31 '25 09:10 madasta