Skip to content

Commit 1dcc596

Browse files
committed
add japanese
1 parent 7fdd80d commit 1dcc596

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

example.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,12 @@ def cosyvoice3_example():
9595
'./asset/zero_shot_prompt.wav', stream=False)):
9696
torchaudio.save('hotfix_{}.wav'.format(i), j['tts_speech'], cosyvoice.sample_rate)
9797

98+
# NOTE for Japanese usage, you must translate it to katakana.
99+
# 歴史的世界においては、過去は単に過ぎ去ったものではない、プラトンのいう如く非有が有である。 -> レキシ テキ セカイ ニ オイ テ ワ、カコ ワ タンニ スギサッ タ モノ デ ワ ナイ、プラトン ノ イウ ゴトク ヒ ユー ガ ユー デ アル。
100+
for i, j in enumerate(cosyvoice.inference_cross_lingual('You are a helpful assistant.<|endofprompt|>レキシ テキ セカイ ニ オイ テ ワ、カコ ワ タンニ スギサッ タ モノ デ ワ ナイ、プラトン ノ イウ ゴトク ヒ ユー ガ ユー デ アル。',
101+
'./asset/zero_shot_prompt.wav', stream=False)):
102+
torchaudio.save('japanese_{}.wav'.format(i), j['tts_speech'], cosyvoice.sample_rate)
103+
98104

99105
def main():
100106
# cosyvoice_example()

0 commit comments

Comments
 (0)