mirror of
https://github.com/FunAudioLLM/CosyVoice.git
synced 2026-02-05 18:09:24 +08:00
revert readme
This commit is contained in:
24
README.md
24
README.md
@@ -34,13 +34,13 @@ sudo yum install sox sox-devel
|
||||
```
|
||||
|
||||
**Model download**
|
||||
> *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.*
|
||||
|
||||
We strongly recommend that you download our pretrained `CosyVoice-300M` `CosyVoice-300M-SFT` `CosyVoice-300M-Instruct` model and `CosyVoice-ttsfrd` resource.
|
||||
|
||||
Download models with python script.
|
||||
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')
|
||||
@@ -48,8 +48,8 @@ snapshot_download('iic/CosyVoice-300M-Instruct', local_dir='pretrained_models/Co
|
||||
snapshot_download('iic/CosyVoice-ttsfrd', local_dir='pretrained_models/CosyVoice-ttsfrd')
|
||||
```
|
||||
|
||||
Download models with git, you should install [git lfs](https://github.com/git-lfs/git-lfs?utm_source=CosyVoice_site&utm_medium=download_models&utm_campaign=gitlfs#installing) 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
|
||||
@@ -122,24 +122,6 @@ 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**
|
||||
|
||||
The `runtime/python/fastapi_server.py` file contains the http API build with `FastAPI`.
|
||||
|
||||
```sh
|
||||
cd runtime/python
|
||||
# Set inference model
|
||||
export MODEL_DIR=pretrained_models/CosyVoice-300M-Instruct
|
||||
|
||||
# For development
|
||||
fastapi dev --port 6006 fastapi_server.py
|
||||
# For production
|
||||
fastapi run --port 6006 fastapi_server.py
|
||||
|
||||
# Call the API with python client
|
||||
python fastapi_client.py --api_base http://127.0.0.1:6006 --mode cross_lingual --tts_wav ./demo.wav
|
||||
```
|
||||
|
||||
**Build for deployment**
|
||||
|
||||
Optionally, if you want to use grpc for service deployment,
|
||||
|
||||
Reference in New Issue
Block a user