Spaces:
Running
on
Zero
Running
on
Zero
install deepspeed only on linux
Browse files- README.md +2 -2
- requirements.txt +1 -1
README.md
CHANGED
@@ -88,7 +88,7 @@ output = cosyvoice.inference_sft('你好,我是通义生成式语音大模型
|
|
88 |
torchaudio.save('sft.wav', output['tts_speech'], 22050)
|
89 |
|
90 |
cosyvoice = CosyVoice('pretrained_models/CosyVoice-300M')
|
91 |
-
# zero_shot usage
|
92 |
prompt_speech_16k = load_wav('zero_shot_prompt.wav', 16000)
|
93 |
output = cosyvoice.inference_zero_shot('收到好友从远方寄来的生日礼物,那份意外的惊喜与深深的祝福让我心中充满了甜蜜的快乐,笑容如花儿般绽放。', '希望你以后能够做的比我还好呦。', prompt_speech_16k)
|
94 |
torchaudio.save('zero_shot.wav', output['tts_speech'], 22050)
|
@@ -98,7 +98,7 @@ output = cosyvoice.inference_cross_lingual('<|en|>And then later on, fully acqui
|
|
98 |
torchaudio.save('cross_lingual.wav', output['tts_speech'], 22050)
|
99 |
|
100 |
cosyvoice = CosyVoice('pretrained_models/CosyVoice-300M-Instruct')
|
101 |
-
# instruct usage
|
102 |
output = cosyvoice.inference_instruct('在面对挑战时,他展现了非凡的<strong>勇气</strong>与<strong>智慧</strong>。', '中文男', 'Theo \'Crimson\', is a fiery, passionate rebel leader. Fights with fervor for justice, but struggles with impulsiveness.')
|
103 |
torchaudio.save('instruct.wav', output['tts_speech'], 22050)
|
104 |
```
|
|
|
88 |
torchaudio.save('sft.wav', output['tts_speech'], 22050)
|
89 |
|
90 |
cosyvoice = CosyVoice('pretrained_models/CosyVoice-300M')
|
91 |
+
# zero_shot usage, <|zh|><|en|><|jp|><|yue|><|ko|> for Chinese/English/Japanese/Cantonese/Korean
|
92 |
prompt_speech_16k = load_wav('zero_shot_prompt.wav', 16000)
|
93 |
output = cosyvoice.inference_zero_shot('收到好友从远方寄来的生日礼物,那份意外的惊喜与深深的祝福让我心中充满了甜蜜的快乐,笑容如花儿般绽放。', '希望你以后能够做的比我还好呦。', prompt_speech_16k)
|
94 |
torchaudio.save('zero_shot.wav', output['tts_speech'], 22050)
|
|
|
98 |
torchaudio.save('cross_lingual.wav', output['tts_speech'], 22050)
|
99 |
|
100 |
cosyvoice = CosyVoice('pretrained_models/CosyVoice-300M-Instruct')
|
101 |
+
# instruct usage, support <laughter></laughter><strong></strong>[laughter][breath]
|
102 |
output = cosyvoice.inference_instruct('在面对挑战时,他展现了非凡的<strong>勇气</strong>与<strong>智慧</strong>。', '中文男', 'Theo \'Crimson\', is a fiery, passionate rebel leader. Fights with fervor for justice, but struggles with impulsiveness.')
|
103 |
torchaudio.save('instruct.wav', output['tts_speech'], 22050)
|
104 |
```
|
requirements.txt
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
--extra-index-url https://download.pytorch.org/whl/cu118
|
2 |
conformer==0.3.2
|
3 |
-
deepspeed==0.14.2
|
4 |
diffusers==0.27.2
|
5 |
gdown==5.1.0
|
6 |
gradio==4.32.2
|
|
|
1 |
--extra-index-url https://download.pytorch.org/whl/cu118
|
2 |
conformer==0.3.2
|
3 |
+
deepspeed==0.14.2; sys_platform == 'linux'
|
4 |
diffusers==0.27.2
|
5 |
gdown==5.1.0
|
6 |
gradio==4.32.2
|