Spaces:
Running
on
Zero
Running
on
Zero
刘悦
commited on
Commit
•
6f6ad85
1
Parent(s):
9b7c915
Update README.md
Browse files
README.md
CHANGED
@@ -80,7 +80,7 @@ export PYTHONPATH=third_party/Matcha-TTS
|
|
80 |
|
81 |
``` python
|
82 |
from cosyvoice.cli.cosyvoice import CosyVoice
|
83 |
-
from cosyvoice.utils.file_utils import load_wav
|
84 |
import torchaudio
|
85 |
|
86 |
cosyvoice = CosyVoice('pretrained_models/CosyVoice-300M-SFT')
|
@@ -89,10 +89,6 @@ print(cosyvoice.list_avaliable_spks())
|
|
89 |
output = cosyvoice.inference_sft('你好,我是通义生成式语音大模型,请问有什么可以帮您的吗?', '中文女')
|
90 |
torchaudio.save('sft.wav', output['tts_speech'], 22050)
|
91 |
|
92 |
-
# if you wanna change the speed
|
93 |
-
audio,sample_rate = speed_change(output["tts_speech"],22050,"1.6")
|
94 |
-
torchaudio.save('sft_speed_1.6.wav',audio, 22050)
|
95 |
-
|
96 |
cosyvoice = CosyVoice('pretrained_models/CosyVoice-300M')
|
97 |
# zero_shot usage, <|zh|><|en|><|jp|><|yue|><|ko|> for Chinese/English/Japanese/Cantonese/Korean
|
98 |
prompt_speech_16k = load_wav('zero_shot_prompt.wav', 16000)
|
|
|
80 |
|
81 |
``` python
|
82 |
from cosyvoice.cli.cosyvoice import CosyVoice
|
83 |
+
from cosyvoice.utils.file_utils import load_wav
|
84 |
import torchaudio
|
85 |
|
86 |
cosyvoice = CosyVoice('pretrained_models/CosyVoice-300M-SFT')
|
|
|
89 |
output = cosyvoice.inference_sft('你好,我是通义生成式语音大模型,请问有什么可以帮您的吗?', '中文女')
|
90 |
torchaudio.save('sft.wav', output['tts_speech'], 22050)
|
91 |
|
|
|
|
|
|
|
|
|
92 |
cosyvoice = CosyVoice('pretrained_models/CosyVoice-300M')
|
93 |
# zero_shot usage, <|zh|><|en|><|jp|><|yue|><|ko|> for Chinese/English/Japanese/Cantonese/Korean
|
94 |
prompt_speech_16k = load_wav('zero_shot_prompt.wav', 16000)
|