mirror of
https://github.com/FunAudioLLM/CosyVoice.git
synced 2026-02-04 17:39:25 +08:00
add japanese
This commit is contained in:
@@ -95,6 +95,12 @@ def cosyvoice3_example():
|
|||||||
'./asset/zero_shot_prompt.wav', stream=False)):
|
'./asset/zero_shot_prompt.wav', stream=False)):
|
||||||
torchaudio.save('hotfix_{}.wav'.format(i), j['tts_speech'], cosyvoice.sample_rate)
|
torchaudio.save('hotfix_{}.wav'.format(i), j['tts_speech'], cosyvoice.sample_rate)
|
||||||
|
|
||||||
|
# NOTE for Japanese usage, you must translate it to katakana.
|
||||||
|
# 歴史的世界においては、過去は単に過ぎ去ったものではない、プラトンのいう如く非有が有である。 -> レキシ テキ セカイ ニ オイ テ ワ、カコ ワ タンニ スギサッ タ モノ デ ワ ナイ、プラトン ノ イウ ゴトク ヒ ユー ガ ユー デ アル。
|
||||||
|
for i, j in enumerate(cosyvoice.inference_cross_lingual('You are a helpful assistant.<|endofprompt|>レキシ テキ セカイ ニ オイ テ ワ、カコ ワ タンニ スギサッ タ モノ デ ワ ナイ、プラトン ノ イウ ゴトク ヒ ユー ガ ユー デ アル。',
|
||||||
|
'./asset/zero_shot_prompt.wav', stream=False)):
|
||||||
|
torchaudio.save('japanese_{}.wav'.format(i), j['tts_speech'], cosyvoice.sample_rate)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
# cosyvoice_example()
|
# cosyvoice_example()
|
||||||
|
|||||||
Reference in New Issue
Block a user