Update README.md
Browse files
README.md
CHANGED
|
@@ -120,5 +120,67 @@ language:
|
|
| 120 |
sudo yum install sox sox-devel
|
| 121 |
```
|
| 122 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
## Disclaimer
|
| 124 |
The content provided above is for academic purposes only and is intended to demonstrate technical capabilities. Some examples are sourced from the internet. If any content infringes on your rights, please contact us to request its removal.
|
|
|
|
| 120 |
sudo yum install sox sox-devel
|
| 121 |
```
|
| 122 |
|
| 123 |
+
## Install
|
| 124 |
+
|
| 125 |
+
### Clone and install
|
| 126 |
+
|
| 127 |
+
- Clone the repo
|
| 128 |
+
``` sh
|
| 129 |
+
git clone --recursive https://github.com/FunAudioLLM/CosyVoice.git
|
| 130 |
+
# If you failed to clone the submodule due to network failures, please run the following command until success
|
| 131 |
+
cd CosyVoice
|
| 132 |
+
git submodule update --init --recursive
|
| 133 |
+
```
|
| 134 |
+
|
| 135 |
+
- Install Conda: please see https://docs.conda.io/en/latest/miniconda.html
|
| 136 |
+
- Create Conda env:
|
| 137 |
+
|
| 138 |
+
``` sh
|
| 139 |
+
conda create -n cosyvoice -y python=3.10
|
| 140 |
+
conda activate cosyvoice
|
| 141 |
+
pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host=mirrors.aliyun.com
|
| 142 |
+
|
| 143 |
+
# If you encounter sox compatibility issues
|
| 144 |
+
# ubuntu
|
| 145 |
+
sudo apt-get install sox libsox-dev
|
| 146 |
+
# centos
|
| 147 |
+
sudo yum install sox sox-devel
|
| 148 |
+
```
|
| 149 |
+
|
| 150 |
+
### Model download
|
| 151 |
+
|
| 152 |
+
We strongly recommend that you download our pretrained `Fun-CosyVoice3-0.5B` `CosyVoice2-0.5B` `CosyVoice-300M` `CosyVoice-300M-SFT` `CosyVoice-300M-Instruct` model and `CosyVoice-ttsfrd` resource.
|
| 153 |
+
|
| 154 |
+
``` python
|
| 155 |
+
# modelscope SDK model download
|
| 156 |
+
from modelscope import snapshot_download
|
| 157 |
+
snapshot_download('FunAudioLLM/Fun-CosyVoice3-0.5B-2512', local_dir='pretrained_models/Fun-CosyVoice3-0.5B')
|
| 158 |
+
snapshot_download('iic/CosyVoice-ttsfrd', local_dir='pretrained_models/CosyVoice-ttsfrd')
|
| 159 |
+
|
| 160 |
+
# for oversea users, huggingface SDK model download
|
| 161 |
+
from huggingface_hub import snapshot_download
|
| 162 |
+
snapshot_download('FunAudioLLM/Fun-CosyVoice3-0.5B-2512', local_dir='pretrained_models/Fun-CosyVoice3-0.5B')
|
| 163 |
+
snapshot_download('FunAudioLLM/CosyVoice-ttsfrd', local_dir='pretrained_models/CosyVoice-ttsfrd')
|
| 164 |
+
```
|
| 165 |
+
|
| 166 |
+
Optionally, you can unzip `ttsfrd` resource and install `ttsfrd` package for better text normalization performance.
|
| 167 |
+
|
| 168 |
+
Notice that this step is not necessary. If you do not install `ttsfrd` package, we will use wetext by default.
|
| 169 |
+
|
| 170 |
+
``` sh
|
| 171 |
+
cd pretrained_models/CosyVoice-ttsfrd/
|
| 172 |
+
unzip resource.zip -d .
|
| 173 |
+
pip install ttsfrd_dependency-0.1-py3-none-any.whl
|
| 174 |
+
pip install ttsfrd-0.4.2-cp310-cp310-linux_x86_64.whl
|
| 175 |
+
```
|
| 176 |
+
|
| 177 |
+
### Basic Usage
|
| 178 |
+
|
| 179 |
+
We strongly recommend using `Fun-CosyVoice3-0.5B` for better performance.
|
| 180 |
+
Follow the code in `example.py` for detailed usage of each model.
|
| 181 |
+
```sh
|
| 182 |
+
python example.py
|
| 183 |
+
```
|
| 184 |
+
|
| 185 |
## Disclaimer
|
| 186 |
The content provided above is for academic purposes only and is intended to demonstrate technical capabilities. Some examples are sourced from the internet. If any content infringes on your rights, please contact us to request its removal.
|