|
|
@@ -37,17 +37,13 @@ We strongly recommend that you download our pretrained `CosyVoice-300M` `CosyVoi
|
|
|
|
|
|
If you are expert in this field, and you are only interested in training your own CosyVoice model from scratch, you can skip this step.
|
|
|
|
|
|
-``` python
|
|
|
-# SDK模型下载
|
|
|
-from modelscope import snapshot_download
|
|
|
-snapshot_download('iic/CosyVoice-300M', local_dir='pretrained_models/CosyVoice-300M')
|
|
|
-snapshot_download('iic/CosyVoice-300M-SFT', local_dir='pretrained_models/CosyVoice-300M-SFT')
|
|
|
-snapshot_download('iic/CosyVoice-300M-Instruct', local_dir='pretrained_models/CosyVoice-300M-Instruct')
|
|
|
-snapshot_download('iic/CosyVoice-ttsfrd', local_dir='pretrained_models/CosyVoice-ttsfrd')
|
|
|
+Download models with python script.
|
|
|
+``` shell
|
|
|
+python download.py
|
|
|
```
|
|
|
|
|
|
+Download models with git, you should install `git lfs` first.
|
|
|
``` sh
|
|
|
-# git模型下载,请确保已安装git lfs
|
|
|
mkdir -p pretrained_models
|
|
|
git clone https://www.modelscope.cn/iic/CosyVoice-300M.git pretrained_models/CosyVoice-300M
|
|
|
git clone https://www.modelscope.cn/iic/CosyVoice-300M-SFT.git pretrained_models/CosyVoice-300M-SFT
|
|
|
@@ -120,6 +116,14 @@ python3 webui.py --port 50000 --model_dir pretrained_models/CosyVoice-300M
|
|
|
For advanced user, we have provided train and inference scripts in `examples/libritts/cosyvoice/run.sh`.
|
|
|
You can get familiar with CosyVoice following this recipie.
|
|
|
|
|
|
+**Serve with FastAPI**
|
|
|
+```sh
|
|
|
+# For development
|
|
|
+fastapi dev --port 3003
|
|
|
+# For production
|
|
|
+fastapi run --port 3003
|
|
|
+```
|
|
|
+
|
|
|
**Build for deployment**
|
|
|
|
|
|
Optionally, if you want to use grpc for service deployment,
|